radeonsi/gfx9: don't compare src_va w/ dst_va for CP_DMA_CLEAR
authorMarek Olšák <marek.olsak@amd.com>
Tue, 28 Mar 2017 17:06:31 +0000 (19:06 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 31 Mar 2017 19:41:57 +0000 (21:41 +0200)
src_va contains the clear value in this case.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_cp_dma.c

index 1381d8cfc9462e519b7bf8715db28e5a986ccee0..74e0b2d46df0d9267d5f74371b13226beb59e288 100644 (file)
@@ -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);