Mesa (master): intel: Fix rendering to a multisample front buffer

Chad Versace chadversary at kemper.freedesktop.org
Tue Aug 14 23:21:37 UTC 2012


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

Author: Chad Versace <chad.versace at linux.intel.com>
Date:   Thu Aug  9 09:24:29 2012 -0700

intel: Fix rendering to a multisample front buffer

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

Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/mesa/drivers/dri/intel/intel_context.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index acd5917..a9064c7 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);
 




More information about the mesa-commit mailing list