diff options
Diffstat (limited to 'src/gallium/drivers/freedreno')
6 files changed, 18 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index e81d31175f0..13a17e2a78e 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -126,6 +126,12 @@ fd_context_destroy(struct pipe_context *pctx) fd_device_del(ctx->dev); + if (fd_mesa_debug & (FD_DBG_BSTAT | FD_DBG_MSGS)) { + printf("batch_total=%u, batch_sysmem=%u, batch_gmem=%u, batch_restore=%u\n", + (uint32_t)ctx->stats.batch_total, (uint32_t)ctx->stats.batch_sysmem, + (uint32_t)ctx->stats.batch_gmem, (uint32_t)ctx->stats.batch_restore); + } + FREE(ctx); } diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index f067715e535..b8ba4545b94 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 9ca7f5f93ff..a075a8b5c95 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); diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index ae8061cba28..5bcf11da85b 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -575,8 +575,8 @@ fd_resource_create(struct pipe_screen *pscreen, enum pipe_format format = tmpl->format; uint32_t size, alignment; - DBG("target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, " - "nr_samples=%u, usage=%u, bind=%x, flags=%x", + DBG("%p: target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, " + "nr_samples=%u, usage=%u, bind=%x, flags=%x", prsc, tmpl->target, util_format_name(format), tmpl->width0, tmpl->height0, tmpl->depth0, tmpl->array_size, tmpl->last_level, tmpl->nr_samples, diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 31f2cb2147a..1a59a883b6d 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -76,6 +76,7 @@ static const struct debug_named_value debug_options[] = { {"deqp", FD_DBG_DEQP, "Enable dEQP hacks"}, {"nir", FD_DBG_NIR, "Prefer NIR as native IR"}, {"reorder", FD_DBG_REORDER,"Enable reordering for draws/blits"}, + {"bstat", FD_DBG_BSTAT, "Print batch stats at context destroy"}, DEBUG_NAMED_VALUE_END }; diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 5cb958e65ab..ea08e31c465 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -76,6 +76,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op); #define FD_DBG_DEQP 0x2000 #define FD_DBG_NIR 0x4000 #define FD_DBG_REORDER 0x8000 +#define FD_DBG_BSTAT 0x10000 extern int fd_mesa_debug; extern bool fd_binning_enabled; |