summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_batchbuffer.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-02-20 13:23:47 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-21 12:59:35 +0000
commitaac120977d1ead319141d48d65c9bba626ec03b8 (patch)
treed1ac3a43eb7d784883c6d8076cd3ca5b9bd53909 /src/mesa/drivers/dri/intel/intel_batchbuffer.h
parent8d68a90e225d831a395ba788e425cb717eec1f9a (diff)
i965: Move repeat-instruction-suppression to batchbuffer core
Move the tracking of the last emitted instructions into the core batchbuffer routines and take advantage of the shadow batch copy to avoid extra memory allocations and copies. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_batchbuffer.h')
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index 7699715c0e..a0a5c9841c 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -101,9 +101,9 @@ intel_batchbuffer_begin(struct intel_context *intel, int n, bool is_blit)
{
intel_batchbuffer_require_space(intel, n * 4, is_blit);
+ intel->batch.emit = intel->batch.used;
#ifdef DEBUG
- intel->batch.emit.total = n;
- intel->batch.emit.start_ptr = intel->batch.used;
+ intel->batch.total = n;
#endif
}
@@ -123,6 +123,8 @@ intel_batchbuffer_advance(struct intel_context *intel)
#endif
}
+void intel_batchbuffer_cached_advance(struct intel_context *intel);
+
/* Here are the crusty old macros, to be removed:
*/
#define BATCH_LOCALS
@@ -141,5 +143,6 @@ intel_batchbuffer_advance(struct intel_context *intel)
} while (0)
#define ADVANCE_BATCH() intel_batchbuffer_advance(intel);
+#define CACHED_BATCH() intel_batchbuffer_cached_advance(intel);
#endif