summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/intel_tris.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-11-15 09:59:33 +0000
committerMichel Dänzer <michel@tungstengraphics.com>2007-11-26 17:49:29 +0100
commita8fee3a498c8c4966d57a5273408477f3aa3ce73 (patch)
tree32cf888e1f5214bd310713df65a948286a9dc20c /src/mesa/drivers/dri/i915/intel_tris.c
parent63e6bfe8db10313c7f48de0b8ddbcd6b47f7e327 (diff)
i915: Catch cases where not all state is emitted for a new batchbuffer.
This could lead to incorrect rendering or even lockups.
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_tris.c')
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 67f02cfc3a..4b45dc065c 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -111,6 +111,9 @@ intelStartInlinePrimitive(struct intel_context *intel,
BEGIN_BATCH(2, batch_flags);
OUT_BATCH(0);
+ assert(intel->batch->id == intel->last_state_batch_id);
+ assert((intel->batch->dirty_state & (1<<1)) == 0);
+
intel->prim.start_ptr = intel->batch->ptr;
intel->prim.primitive = prim;
intel->prim.flush = intel_flush_inline_primitive;