Mesa (master): radeonsi: don' t count fast clears and prefetches into CP DMA stats

Marek Olšák mareko at kemper.freedesktop.org
Fri Jan 6 20:06:16 UTC 2017


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Dec 25 18:34:16 2016 +0100

radeonsi: don't count fast clears and prefetches into CP DMA stats

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

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

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 @@ static void si_clear_buffer(struct pipe_context *ctx, struct pipe_resource *dst,
 	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 @@ void si_copy_buffer(struct si_context *sctx,
 	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)




More information about the mesa-commit mailing list