From ea595214756cdc366c4c5a27316efa00556ac4ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 28 Mar 2017 19:06:31 +0200 Subject: [PATCH] radeonsi/gfx9: don't compare src_va w/ dst_va for CP_DMA_CLEAR MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit src_va contains the clear value in this case. Reviewed-by: Nicolai Hähnle --- 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 @@ -84,7 +84,8 @@ static void si_emit_cp_dma(struct si_context *sctx, uint64_t dst_va, 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); -- 2.7.4