[Mesa-dev] [PATCH 09/10] radeonsi/gfx9: don't compare src_va w/ dst_va for CP_DMA_CLEAR
Marek Olšák
maraeo at gmail.com
Thu Mar 30 17:16:06 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
src_va contains the clear value in this case.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeonsi/si_cp_dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c
index 1381d8c..74e0b2d 100644
--- a/src/gallium/drivers/radeonsi/si_cp_dma.c
+++ b/src/gallium/drivers/radeonsi/si_cp_dma.c
@@ -77,21 +77,22 @@ static void si_emit_cp_dma(struct si_context *sctx, uint64_t dst_va,
if (sctx->b.chip_class >= GFX9)
command |= S_414_DISABLE_WR_CONFIRM_GFX9(1);
else
command |= S_414_DISABLE_WR_CONFIRM_GFX6(1);
}
if (flags & CP_DMA_RAW_WAIT)
command |= S_414_RAW_WAIT(1);
/* Src and dst flags. */
- if (sctx->b.chip_class >= GFX9 && src_va == dst_va)
+ if (sctx->b.chip_class >= GFX9 && !(flags & CP_DMA_CLEAR) &&
+ src_va == dst_va)
header |= S_411_DSL_SEL(V_411_NOWHERE); /* prefetch only */
else if (flags & CP_DMA_USE_L2)
header |= S_411_DSL_SEL(V_411_DST_ADDR_TC_L2);
if (flags & CP_DMA_CLEAR)
header |= S_411_SRC_SEL(V_411_DATA);
else if (flags & CP_DMA_USE_L2)
header |= S_411_SRC_SEL(V_411_SRC_ADDR_TC_L2);
if (sctx->b.chip_class >= CIK) {
--
2.7.4
More information about the mesa-dev
mailing list