From b150fa214b259f0039293c2e727bb77d7417c541 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 31 Mar 2020 13:08:16 -0400 Subject: [PATCH] pan/bi: Add cmdline option for verbose disassembly Useful for debugging packing. Signed-off-by: Alyssa Rosenzweig Part-of: --- 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) -- 2.30.2