summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_batchbuffer.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-01-10 13:24:14 -0800
committerEric Anholt <[email protected]>2008-01-10 13:24:14 -0800
commitab2933df65628d8f1f0a3f49129442bc8d2c3a2b (patch)
tree88c19afcfd9c9b8cd24e6edb8c93e203aa855117 /src/mesa/drivers/dri/intel/intel_batchbuffer.c
parenta04b632350e5d0e9994fc667afc59407a39da0ba (diff)
[intel] Only flush batch when changing draw buffers, not every cliprect update.
The previous code would reference freed memory on window moves.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_batchbuffer.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index ff2045dabe8..cff15d253de 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -188,7 +188,8 @@ do_flush_locked(struct intel_batchbuffer *batch,
}
void
-intel_batchbuffer_flush(struct intel_batchbuffer *batch)
+_intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
+ int line)
{
struct intel_context *intel = batch->intel;
GLuint used = batch->ptr - batch->map;
@@ -197,6 +198,9 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch)
if (used == 0)
return;
+ if (INTEL_DEBUG & DEBUG_BATCH)
+ fprintf(stderr, "%s:%d: Batchbuffer flush with %db used\n", file, line,
+ used);
/* Add the MI_BATCH_BUFFER_END. Always add an MI_FLUSH - this is a
* performance drain that we would like to avoid.
*/