summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-07-02 11:16:30 -0700
committerEric Anholt <[email protected]>2008-07-02 11:16:30 -0700
commita995bdced20a55759dffd901c10ec5fb251191cf (patch)
treea7c51208f53c2de07875842f761b5509f6f54f87 /src
parent4b3ed4d2d16811a624857519e95303017f4160b5 (diff)
intel-gem: Emit an MI_FLUSH at glFlush() so frontbuffer rendering is flushed.
We have something similar in the X Server that covers X Server rendering, this is the equivalent here for rendering to the front buffer. If we cared about avoiding this at glFlush time, we could only do this when some actual frontbuffer rendering had occurred. Bug #16392.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 33b8843e33e..fa0b4c56180 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -365,6 +365,12 @@ intelFlush(GLcontext * ctx)
if (!IS_965(intel->intelScreen->deviceID))
INTEL_FIREVERTICES(intel);
+ /* Emit a flush so that any frontbuffer rendering that might have occurred
+ * lands onscreen in a timely manner, even if the X Server doesn't trigger
+ * a flush for us.
+ */
+ intel_batchbuffer_emit_mi_flush(intel->batch);
+
if (intel->batch->map != intel->batch->ptr)
intel_batchbuffer_flush(intel->batch);
}