diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-24 15:32:50 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-24 15:28:21 +0000 |
commit | ec133abc4bd8caba15ed54e18621b816afb06981 (patch) | |
tree | 3ab9acad2b1a59df65fb37c58a370fb34586319a /src | |
parent | 86f23f21ab57fcbc031bcd2b8f432a08ff4cc320 (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel_batchbuffer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h index 3f783b00..0d6c3f72 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; |