diff options
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_vtbl.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index 4fd1617319..325ff86973 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -416,7 +416,7 @@ i830_emit_state(struct intel_context *intel) struct i830_context *i830 = i830_context(&intel->ctx); struct i830_hw_state *state = i830->current; int i; - GLuint dirty = state->active & ~state->emitted; + GLuint dirty; BATCH_LOCALS; /* We don't hold the lock at this point, so want to make sure that @@ -428,6 +428,11 @@ i830_emit_state(struct intel_context *intel) */ intel_batchbuffer_require_space(intel->batch, get_state_size(state), 0); + /* Do this here as we may have flushed the batchbuffer above, + * causing more state to be dirty! + */ + dirty = state->active & ~state->emitted; + if (dirty & I830_UPLOAD_INVARIENT) { DBG("I830_UPLOAD_INVARIENT:\n"); i830_emit_invarient_state(intel); @@ -575,6 +580,14 @@ i830_flush_cmd(void) } +static void +i830_assert_not_dirty( struct intel_context *intel ) +{ + struct i830_context *i830 = i830_context(&intel->ctx); + struct i830_hw_state *state = i830->current; + GLuint dirty = state->active & ~state->emitted; + assert(!dirty); +} void @@ -589,4 +602,5 @@ i830InitVtbl(struct i830_context *i830) i830->intel.vtbl.update_texture_state = i830UpdateTextureState; i830->intel.vtbl.flush_cmd = i830_flush_cmd; i830->intel.vtbl.render_start = i830_render_start; + i830->intel.vtbl.assert_not_dirty = i830_assert_not_dirty; } |