[Mesa-dev] [PATCH 3/3] intel: Fix rendering to a multisample front buffer

Chad Versace chad.versace at linux.intel.com
Thu Aug 9 09:59:03 PDT 2012


We need to downsample before flushing BUFFER_FAKE_FRONT_LEFT to
BUFFER_FRONT_LEFT in intel_flush_front.

CC: Eric Anholt <eric at aholt.net>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 src/mesa/drivers/dri/intel/intel_context.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index b428858..c14a2b1 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -283,6 +283,16 @@ intel_flush_front(struct gl_context *ctx)
       if (screen->dri2.loader->flushFrontBuffer != NULL &&
           driDrawable &&
           driDrawable->loaderPrivate) {
+
+         /* Downsample before flushing FAKE_FRONT_LEFT to FRONT_LEFT.
+          *
+          * This potentially downsamples both front and back buffer. It
+          * is unnecessary to downsample the back, but harms nothing except
+          * performance. And no one cares about front-buffer render
+          * performance.
+          */
+         intel_downsample_for_dri2_flush(intel, driDrawable);
+
          screen->dri2.loader->flushFrontBuffer(driDrawable,
                                                driDrawable->loaderPrivate);
 
-- 
1.7.11.4



More information about the mesa-dev mailing list