Mesa (master): i965: Call prepare_external after implicit window-system MSAA resolves

Jason Ekstrand jekstrand at kemper.freedesktop.org
Fri Feb 2 05:45:49 UTC 2018


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Jan 31 17:31:39 2018 -0800

i965: Call prepare_external after implicit window-system MSAA resolves

This fixes some rendering corruption in a couple of Android apps that
use window-system MSAA.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104741
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

---

 src/mesa/drivers/dri/i965/brw_context.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index addacf2cf8..e5d3b5c707 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1283,6 +1283,21 @@ intel_resolve_for_dri2_flush(struct brw_context *brw,
          intel_miptree_prepare_external(brw, rb->mt);
       } else {
          intel_renderbuffer_downsample(brw, rb);
+
+         /* Call prepare_external on the single-sample miptree to do any
+          * needed resolves prior to handing it off to the window system.
+          * This is needed in the case that rb->singlesample_mt is Y-tiled
+          * with CCS_E enabled but without I915_FORMAT_MOD_Y_TILED_CCS_E.  In
+          * this case, the MSAA resolve above will write compressed data into
+          * rb->singlesample_mt.
+          *
+          * TODO: Some day, if we decide to care about the tiny performance
+          * hit we're taking by doing the MSAA resolve and then a CCS resolve,
+          * we could detect this case and just allocate the single-sampled
+          * miptree without aux.  However, that would be a lot of plumbing and
+          * this is a rather exotic case so it's not really worth it.
+          */
+         intel_miptree_prepare_external(brw, rb->singlesample_mt);
       }
    }
 }




More information about the mesa-commit mailing list