Mesa (main): radeonsi: add AMD_DEBUG=ib to print IBs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 10 23:44:51 UTC 2021
Module: Mesa
Branch: main
Commit: 0e6425291262276ab770dde4ca65ac923614408a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e6425291262276ab770dde4ca65ac923614408a
Author: Marek Olšák <marek.olsak at amd.com>
Date: Sat Aug 21 18:01:49 2021 -0400
radeonsi: add AMD_DEBUG=ib to print IBs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
---
src/gallium/drivers/radeonsi/si_gfx_cs.c | 3 +++
src/gallium/drivers/radeonsi/si_pipe.c | 1 +
src/gallium/drivers/radeonsi/si_pipe.h | 1 +
3 files changed, 5 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c
index 3bd8417b6bb..1081b238bcd 100644
--- a/src/gallium/drivers/radeonsi/si_gfx_cs.c
+++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c
@@ -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;
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index c52de041304..e77eb0e4de2 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -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"},
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 44f160450f7..057fd9aef55 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -203,6 +203,7 @@ enum
DBG_COMPUTE,
DBG_VM,
DBG_CACHE_STATS,
+ DBG_IB,
/* Driver options: */
DBG_NO_WC,
More information about the mesa-commit
mailing list