Mesa (master): pan/bi: Allow toggling disassembly verbosity

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 21 22:04:49 UTC 2020


Module: Mesa
Branch: master
Commit: 3071f36cfb170e942931d4881d37b227dbc20625
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3071f36cfb170e942931d4881d37b227dbc20625

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Wed Dec 16 15:02:26 2020 -0500

pan/bi: Allow toggling disassembly verbosity

Verbose mode is especially useful for debugging packing, but otherwise
just gets in the way I find.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8139>

---

 src/panfrost/bifrost/bifrost.h         | 1 +
 src/panfrost/bifrost/bifrost_compile.c | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h
index 76d370892d4..0cf96bbf145 100644
--- a/src/panfrost/bifrost/bifrost.h
+++ b/src/panfrost/bifrost/bifrost.h
@@ -32,6 +32,7 @@
 #define BIFROST_DBG_MSGS        0x0001
 #define BIFROST_DBG_SHADERS     0x0002
 #define BIFROST_DBG_SHADERDB    0x0004
+#define BIFROST_DBG_VERBOSE     0x0008
 
 extern int bifrost_debug;
 
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 5dbc9211eb7..17286529ca9 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -41,6 +41,7 @@ static const struct debug_named_value debug_options[] = {
         {"msgs",      BIFROST_DBG_MSGS,		"Print debug messages"},
         {"shaders",   BIFROST_DBG_SHADERS,	"Dump shaders in NIR and MIR"},
         {"shaderdb",  BIFROST_DBG_SHADERDB,	"Print statistics"},
+        {"verbose",   BIFROST_DBG_VERBOSE,	"Disassemble verbosely"},
         DEBUG_NAMED_VALUE_END
 };
 
@@ -2599,8 +2600,11 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir,
 
         memcpy(program->blend_ret_offsets, ctx->blend_ret_offsets, sizeof(program->blend_ret_offsets));
 
-        if (bifrost_debug & BIFROST_DBG_SHADERS && !nir->info.internal)
-                disassemble_bifrost(stdout, program->compiled.data, program->compiled.size, true);
+        if (bifrost_debug & BIFROST_DBG_SHADERS && !nir->info.internal) {
+                disassemble_bifrost(stdout, program->compiled.data,
+                                program->compiled.size,
+                                bifrost_debug & BIFROST_DBG_VERBOSE);
+        }
 
         program->tls_size = ctx->tls_size;
 



More information about the mesa-commit mailing list