diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-02 12:07:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-03 14:05:30 +0000 |
commit | 3cc74044ce3546cc7dc2e918cbabbb41a77f4026 (patch) | |
tree | 39aee30cee0323ba96da44c0247cb028262f1a75 /src/intel_batchbuffer.h | |
parent | a1fa0dbfdafea32139d4457d81b9d722df955eaf (diff) |
i965: Amalgamate surface binding tables
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_batchbuffer.h')
-rw-r--r-- | src/intel_batchbuffer.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h index 21890c44..5b9ff5ed 100644 --- a/src/intel_batchbuffer.h +++ b/src/intel_batchbuffer.h @@ -184,16 +184,18 @@ do { \ FatalError("%s: BEGIN_BATCH called without closing " \ "ADVANCE_BATCH\n", __FUNCTION__); \ assert(!intel->in_batch_atomic); \ - if (intel->current_batch != batch_idx) \ - intel_batch_submit(scrn, FALSE); \ + if (intel->current_batch != batch_idx) { \ + if (intel->current_batch && intel->context_switch) \ + intel->context_switch(intel, batch_idx); \ + } \ intel_batch_require_space(scrn, intel, (n) * 4); \ intel->current_batch = batch_idx; \ intel->batch_emitting = (n); \ intel->batch_emit_start = intel->batch_used; \ } while (0) -#define BEGIN_BATCH(n) __BEGIN_BATCH(n,RENDER_BATCH) -#define BEGIN_BATCH_BLT(n) __BEGIN_BATCH(n,BLT_BATCH) +#define BEGIN_BATCH(n) __BEGIN_BATCH(n,RENDER_BATCH) +#define BEGIN_BATCH_BLT(n) __BEGIN_BATCH(n,BLT_BATCH) #define ADVANCE_BATCH() do { \ if (intel->batch_emitting == 0) \ |