summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-01 11:11:09 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-11-01 11:13:03 +0000
commitb5ae596a0746e5a37e86f5b0980f9265e0061142 (patch)
tree7f4602b9111568936dace82f5b6740f8f9f3df1b
parent42363134bd38fb406d90cdb9e5b227836a793912 (diff)
Flush BLT batches before starting an atomic RENDER batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_batchbuffer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h
index 5863561d..21890c44 100644
--- a/src/intel_batchbuffer.h
+++ b/src/intel_batchbuffer.h
@@ -64,8 +64,11 @@ static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, unsigned int sz)
assert(!intel->in_batch_atomic);
+ if (intel->current_batch != RENDER_BATCH)
+ intel_batch_submit(scrn, FALSE);
+
intel_batch_require_space(scrn, intel, sz * 4);
- intel->current_batch = RENDER_BATCH; \
+ intel->current_batch = RENDER_BATCH;
intel->in_batch_atomic = TRUE;
intel->batch_atomic_limit = intel->batch_used + sz;