Mesa (master): radeonsi/gfx9: use TC L2 for fast color clear with CP DMA

Marek Olšák mareko at kemper.freedesktop.org
Thu Jun 22 11:15:53 UTC 2017


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Jun 20 18:25:05 2017 +0200

radeonsi/gfx9: use TC L2 for fast color clear with CP DMA

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

---

 src/gallium/drivers/radeonsi/si_cp_dma.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c
index 9505d622ae..e737519eef 100644
--- a/src/gallium/drivers/radeonsi/si_cp_dma.c
+++ b/src/gallium/drivers/radeonsi/si_cp_dma.c
@@ -142,8 +142,11 @@ static unsigned get_flush_flags(struct si_context *sctx, enum r600_coherency coh
 
 static unsigned get_tc_l2_flag(struct si_context *sctx, enum r600_coherency coher)
 {
-	return coher == R600_COHERENCY_SHADER &&
-	       sctx->b.chip_class >= CIK ? CP_DMA_USE_L2 : 0;
+	if ((sctx->b.chip_class >= GFX9 && coher == R600_COHERENCY_CB_META) ||
+	    (sctx->b.chip_class >= CIK && coher == R600_COHERENCY_SHADER))
+		return CP_DMA_USE_L2;
+
+	return 0;
 }
 
 static void si_cp_dma_prepare(struct si_context *sctx, struct pipe_resource *dst,




More information about the mesa-commit mailing list