radeonsi: add AMD_DEBUG=ib to print IBs
authorMarek Olšák <marek.olsak@amd.com>
Sat, 21 Aug 2021 22:01:49 +0000 (18:01 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 10 Sep 2021 23:32:03 +0000 (23:32 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>

src/gallium/drivers/radeonsi/si_gfx_cs.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h

index 3bd8417..1081b23 100644 (file)
@@ -133,6 +133,9 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned flags, struct pipe_fence_h
       si_log_hw_flush(ctx);
    }
 
+   if (sscreen->debug_flags & DBG(IB))
+      si_print_current_ib(ctx, stderr);
+
    if (ctx->is_noop)
       flags |= RADEON_FLUSH_NOOP;
 
index c52de04..e77eb0e 100644 (file)
@@ -81,6 +81,7 @@ static const struct debug_named_value radeonsi_debug_options[] = {
    {"compute", DBG(COMPUTE), "Print compute info"},
    {"vm", DBG(VM), "Print virtual addresses when creating resources"},
    {"cache_stats", DBG(CACHE_STATS), "Print shader cache statistics."},
+   {"ib", DBG(IB), "Print command buffers."},
 
    /* Driver options: */
    {"nowc", DBG(NO_WC), "Disable GTT write combining"},
index 44f1604..057fd9a 100644 (file)
@@ -203,6 +203,7 @@ enum
    DBG_COMPUTE,
    DBG_VM,
    DBG_CACHE_STATS,
+   DBG_IB,
 
    /* Driver options: */
    DBG_NO_WC,