freedreno: spiff up some debug traces
Make it easier to track batches, to ensure things happen properly when they are reordered. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)));
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user