[Mesa-dev] [PATCH 2/2] intel: Use the GLSL-based meta clear when available.

Eric Anholt eric at anholt.net
Mon Jul 18 09:33:24 PDT 2011


Improves glxgears performance 19.6% +/- 7.3% (second fps printout.
n=5).
---
 src/mesa/drivers/dri/intel/intel_clear.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index dfca03c..35a9948 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -182,7 +182,10 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
 
    if (tri_mask) {
       debug_mask("tri", tri_mask);
-      _mesa_meta_Clear(&intel->ctx, tri_mask);
+      if (ctx->Extensions.ARB_fragment_shader)
+	 _mesa_meta_glsl_Clear(&intel->ctx, tri_mask);
+      else
+	 _mesa_meta_Clear(&intel->ctx, tri_mask);
    }
 }
 
-- 
1.7.5.4



More information about the mesa-dev mailing list