[Mesa-dev] [PATCH 10/12] freedreno: spiff up some debug traces

Rob Clark robdclark at gmail.com
Sat Jul 2 16:52:13 UTC 2016


Make it easier to track batches, to ensure things happen properly when
they are reordered.

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/gallium/drivers/freedreno/freedreno_draw.c | 6 ++++--
 src/gallium/drivers/freedreno/freedreno_gmem.c | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index b947762..481fb3d 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -170,7 +170,8 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
 	/* and any buffers used, need to be resolved: */
 	batch->resolve |= buffers;
 
-	DBG("%x num_draws=%u (%s/%s)", buffers, batch->num_draws,
+	DBG("%p: %x %ux%u num_draws=%u (%s/%s)", batch, buffers,
+		pfb->width, pfb->height, batch->num_draws,
 		util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
 		util_format_short_name(pipe_surface_format(pfb->zsbuf)));
 
@@ -242,7 +243,8 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
 		batch->gmem_reason |= FD_GMEM_CLEARS_DEPTH_STENCIL;
 	}
 
-	DBG("%x depth=%f, stencil=%u (%s/%s)", buffers, depth, stencil,
+	DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers,
+		pfb->width, pfb->height, depth, stencil,
 		util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
 		util_format_short_name(pipe_surface_format(pfb->zsbuf)));
 
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 9ca7f5f..a075a8b 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -383,7 +383,8 @@ fd_gmem_render_tiles(struct fd_batch *batch)
 	ctx->stats.batch_total++;
 
 	if (sysmem) {
-		DBG("rendering sysmem (%s/%s)",
+		DBG("%p: rendering sysmem %ux%u (%s/%s)",
+			batch, pfb->width, pfb->height,
 			util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
 			util_format_short_name(pipe_surface_format(pfb->zsbuf)));
 		fd_hw_query_prepare(ctx, 1);
@@ -392,7 +393,8 @@ fd_gmem_render_tiles(struct fd_batch *batch)
 	} else {
 		struct fd_gmem_stateobj *gmem = &ctx->gmem;
 		calculate_tiles(batch);
-		DBG("rendering %dx%d tiles (%s/%s)", gmem->nbins_x, gmem->nbins_y,
+		DBG("%p: rendering %dx%d tiles %ux%u (%s/%s)",
+			batch, pfb->width, pfb->height, gmem->nbins_x, gmem->nbins_y,
 			util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
 			util_format_short_name(pipe_surface_format(pfb->zsbuf)));
 		fd_hw_query_prepare(ctx, gmem->nbins_x * gmem->nbins_y);
-- 
2.7.4



More information about the mesa-dev mailing list