Mesa (master): pan/bi: Add cmdline option for verbose disassembly

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 1 02:42:47 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue Mar 31 13:08:16 2020 -0400

pan/bi: Add cmdline option for verbose disassembly

Useful for debugging packing.

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

---

 src/panfrost/bifrost/cmdline.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/panfrost/bifrost/cmdline.c b/src/panfrost/bifrost/cmdline.c
index a0be7605b8b..f82c613115b 100644
--- a/src/panfrost/bifrost/cmdline.c
+++ b/src/panfrost/bifrost/cmdline.c
@@ -78,7 +78,7 @@ compile_shader(char **argv, bool vertex_only)
 }
 
 static void
-disassemble(const char *filename)
+disassemble(const char *filename, bool verbose)
 {
         FILE *fp = fopen(filename, "rb");
         assert(fp);
@@ -94,7 +94,7 @@ disassemble(const char *filename)
         }
         fclose(fp);
 
-        disassemble_bifrost(stdout, code, filesize, false);
+        disassemble_bifrost(stdout, code, filesize, verbose);
         free(code);
 }
 
@@ -166,7 +166,9 @@ main(int argc, char **argv)
         if (strcmp(argv[1], "compile") == 0)
                 compile_shader(&argv[2], false);
         else if (strcmp(argv[1], "disasm") == 0)
-                disassemble(argv[2]);
+                disassemble(argv[2], false);
+        else if (strcmp(argv[1], "disasm-verbose") == 0)
+                disassemble(argv[2], true);
         else if (strcmp(argv[1], "test-vertex") == 0)
                 test_vertex(&argv[2]);
         else if (strcmp(argv[1], "run") == 0)



More information about the mesa-commit mailing list