intel: Don't bother MI_FLUSHing on glFlush in the DRI2 case.
authorEric Anholt <eric@anholt.net>
Mon, 26 Oct 2009 16:37:53 +0000 (09:37 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 29 Oct 2009 17:01:17 +0000 (10:01 -0700)
We only need it when drawing to the front buffer, which we never do for
DRI2.  No significant performance difference, but the flush is definitely
gone from the end of every batchbuffer.

src/mesa/drivers/dri/intel/intel_context.c

index c343249..a7d94ce 100644 (file)
@@ -484,7 +484,7 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
     * lands onscreen in a timely manner, even if the X Server doesn't trigger
     * a flush for us.
     */
-   if (needs_mi_flush)
+   if (!intel->driScreen->dri2.enabled && needs_mi_flush)
       intel_batchbuffer_emit_mi_flush(intel->batch);
 
    if (intel->batch->map != intel->batch->ptr)