radeonsi: don't count fast clears and prefetches into CP DMA stats
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c
index 596e32c..1996e66 100644
--- a/src/gallium/drivers/radeonsi/si_cp_dma.c
+++ b/src/gallium/drivers/radeonsi/si_cp_dma.c
@@ -234,7 +234,9 @@
if (tc_l2_flag)
rdst->TC_L2_dirty = true;
- sctx->b.num_cp_dma_calls++;
+ /* If it's not a framebuffer fast clear... */
+ if (coher == R600_COHERENCY_SHADER)
+ sctx->b.num_cp_dma_calls++;
}
/**
@@ -360,7 +362,9 @@
if (tc_l2_flag)
r600_resource(dst)->TC_L2_dirty = true;
- sctx->b.num_cp_dma_calls++;
+ /* If it's not a prefetch... */
+ if (dst_offset != src_offset)
+ sctx->b.num_cp_dma_calls++;
}
void si_init_cp_dma_functions(struct si_context *sctx)