Mesa (master): radeonsi: don' t flush and wait for CB after depth-only rendering

Marek Olšák mareko at kemper.freedesktop.org
Mon Jun 26 21:35:29 UTC 2017


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Jun 24 22:39:01 2017 +0200

radeonsi: don't flush and wait for CB after depth-only rendering

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/gallium/drivers/radeonsi/si_state.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 0f39ede0c7..b236bed306 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2535,8 +2535,11 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
 	 * (after FMASK decompression). Shader write -> FB read transitions
 	 * cannot happen for MSAA textures, because MSAA shader images are
 	 * not supported.
+	 *
+	 * Only flush and wait for CB if there is actually a bound color buffer.
 	 */
-	if (sctx->framebuffer.nr_samples <= 1) {
+	if (sctx->framebuffer.nr_samples <= 1 &&
+	    sctx->framebuffer.state.nr_cbufs) {
 		sctx->b.flags |= SI_CONTEXT_INV_VMEM_L1 |
 				 SI_CONTEXT_INV_GLOBAL_L2 |
 				 SI_CONTEXT_FLUSH_AND_INV_CB;




More information about the mesa-commit mailing list