summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-10-14 12:04:40 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-03-01 14:52:44 +0000
commit0110c12dd894fd1729e0eef9fab531440f522650 (patch)
tree69817a7913a29b23833f174617d27154566c834c
parent522fbbee7e3101880975a1b80a7cb1ca2fd5714e (diff)
debug: Enable cache flushing after every operation
If DEBUG_FLUSH_CACHES is enabled then emit a MI_FLUSH after every rendering operation. This is intended to 'fix' cases where we are missing a required flush in the middle of a sequence of operations, such as switching between 2D to 3D and render to sampler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 86bc23ab5da34137c82250395c68aa92ecd88a24) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r--src/i830_accel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 8b58b8ce..2734ccd7 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -156,8 +156,11 @@ void I830EmitFlush(ScrnInfoPtr scrn)
void i830_debug_flush(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
+
if (intel->debug_flush & DEBUG_FLUSH_BATCHES)
intel_batch_flush(scrn, FALSE);
+ else if (intel->debug_flush & DEBUG_FLUSH_CACHES)
+ I830EmitFlush(scrn);
}
/* The following function sets up the supported acceleration. Call it