mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
Move get_dirty() call to after reserving space in the batchbuffer as
this may trigger a batchbuffer flush and raise new dirty state.
This commit is contained in:
parent
520ba25dc3
commit
ee525436cc
1 changed files with 6 additions and 1 deletions
|
|
@ -285,7 +285,7 @@ i915_emit_state(struct intel_context *intel)
|
|||
struct i915_context *i915 = i915_context(&intel->ctx);
|
||||
struct i915_hw_state *state = i915->current;
|
||||
int i;
|
||||
GLuint dirty = get_dirty(state);
|
||||
GLuint dirty;
|
||||
BATCH_LOCALS;
|
||||
|
||||
/* We don't hold the lock at this point, so want to make sure that
|
||||
|
|
@ -297,6 +297,11 @@ i915_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 = get_dirty(state);
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_STATE)
|
||||
fprintf(stderr, "%s dirty: %x\n", __FUNCTION__, dirty);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue