aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-31 13:08:16 -0400
committerMarge Bot <[email protected]>2020-04-01 02:25:05 +0000
commitb150fa214b259f0039293c2e727bb77d7417c541 (patch)
treeb6aee7b688674d0f1f4022c80f1644362464822a /src/panfrost
parentae4f48b2bc3b9e1969be738fe230a7b5a880bd0d (diff)
pan/bi: Add cmdline option for verbose disassembly
Useful for debugging packing. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4396>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/cmdline.c8
1 files 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)