summaryrefslogtreecommitdiff
path: root/src/intel_batchbuffer.h
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2010-11-01 13:23:35 +0800
committerChris Wilson <chris@chris-wilson.co.uk>2010-11-01 10:37:51 +0000
commit5bed685f765671d63642b24e17abd70579c40ddf (patch)
tree11db10f673f180dd583752b890a41c3da73aa4d4 /src/intel_batchbuffer.h
parent6ec3ff134baeac33d9d5821695d5f80843a96c91 (diff)
add BLT ring support
gen6+ platform has a BLT engine with seperate command streamer to support BLT commands. Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> [ickle: merge trivial conflict] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_batchbuffer.h')
-rw-r--r--src/intel_batchbuffer.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h
index bf7a5d90..5863561d 100644
--- a/src/intel_batchbuffer.h
+++ b/src/intel_batchbuffer.h
@@ -63,7 +63,9 @@ static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, unsigned int sz)
intel_screen_private *intel = intel_get_screen_private(scrn);
assert(!intel->in_batch_atomic);
+
intel_batch_require_space(scrn, intel, sz * 4);
+ intel->current_batch = RENDER_BATCH; \
intel->in_batch_atomic = TRUE;
intel->batch_atomic_limit = intel->batch_used + sz;
@@ -173,17 +175,23 @@ union intfloat {
OUT_BATCH(tmp.ui); \
} while(0)
-#define BEGIN_BATCH(n) \
+#define __BEGIN_BATCH(n,batch_idx) \
do { \
if (intel->batch_emitting != 0) \
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); \
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 ADVANCE_BATCH() do { \
if (intel->batch_emitting == 0) \
FatalError("%s: ADVANCE_BATCH called with no matching " \