diff options
author | Michel Dänzer <[email protected]> | 2006-12-14 10:49:26 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2006-12-14 11:01:39 +0100 |
commit | 5f8a3e586f21219d02912635a93ce312bcf5987c (patch) | |
tree | ea47828b9cf31bc4d862cefa3f2ce196aafc41a7 /src/mesa/drivers/dri/i915tex | |
parent | 4cb09df015068f6d75e6457b6c98836dd58aaf29 (diff) |
intel_batchbuffer_flush: Don't assert cliprects when lock is not held.
This is a legitimate situation when copying texture data between mipmap trees.
Diffstat (limited to 'src/mesa/drivers/dri/i915tex')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_batchbuffer.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c index b4e0b74f161..be2750d041f 100644 --- a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c @@ -252,6 +252,7 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch) { struct intel_context *intel = batch->intel; GLuint used = batch->ptr - batch->map; + GLboolean was_locked = intel->locked; if (used == 0) return batch->last_fence; @@ -278,17 +279,14 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch) /* TODO: Just pass the relocation list and dma buffer up to the * kernel. */ - if (!intel->locked) { - assert(!(batch->flags & INTEL_BATCH_NO_CLIPRECTS)); - + if (!was_locked) LOCK_HARDWARE(intel); - do_flush_locked(batch, used, GL_FALSE, GL_TRUE); + + do_flush_locked(batch, used, !(batch->flags & INTEL_BATCH_CLIPRECTS), + GL_FALSE); + + if (!was_locked) UNLOCK_HARDWARE(intel); - } - else { - GLboolean ignore_cliprects = !(batch->flags & INTEL_BATCH_CLIPRECTS); - do_flush_locked(batch, used, ignore_cliprects, GL_FALSE); - } /* Reset the buffer: */ |