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);
}
/* 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)));
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)));
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);
} 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);
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,
{"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
};
#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;