summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-03-24 15:32:50 +0000
committerOwain G. Ainsworth <oga@openbsd.org>2011-05-29 23:31:13 +0100
commit21add004fb775bfb962fef9f9e97cb307bd2bdaf (patch)
treea2517acd26dabda9b4350cfa6a68c27e2f631866
parent84efac2196e0481f21bc495a60e0be769e4988ee (diff)
Use the per-generation batch context switch for atomic sequences
A modest boost to throughput and reduction in CPU overhead from not flushing the batch on every transition from BLT to RENDER. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ec133abc4bd8caba15ed54e18621b816afb06981) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r--src/intel_batchbuffer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h
index a88d7ba3..0a2b92ab 100644
--- a/src/intel_batchbuffer.h
+++ b/src/intel_batchbuffer.h
@@ -63,8 +63,10 @@ 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);
+ if (intel->current_batch != RENDER_BATCH) {
+ if (intel->current_batch && intel->context_switch)
+ intel->context_switch(intel, RENDER_BATCH);
+ }
intel_batch_require_space(scrn, intel, sz * 4);
intel->current_batch = RENDER_BATCH;