Mesa (master): intel: Don't bother MI_FLUSHing on glFlush in the DRI2 case.

Eric Anholt anholt at kemper.freedesktop.org
Thu Oct 29 17:01:40 UTC 2009


Module: Mesa
Branch: master
Commit: 6eb6a0e9cbed6ba5543d54e277f7ac11a0612070
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6eb6a0e9cbed6ba5543d54e277f7ac11a0612070

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Oct 26 09:37:53 2009 -0700

intel: Don't bother MI_FLUSHing on glFlush in the DRI2 case.

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index c343249..a7d94ce 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -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)




More information about the mesa-commit mailing list