panfrost/midgard: Add mir_print_bundle helper
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 6 Jun 2019 18:18:30 +0000 (11:18 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 7 Jun 2019 16:05:28 +0000 (09:05 -0700)
This helps with debugging scheduling/emission.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/compiler.h
src/gallium/drivers/panfrost/midgard/midgard_print.c

index 5ee86b416010e23a637643f99d77bba7dad86050..18adbd00f5e0413e44056a11fa9a70ed53d8ab1b 100644 (file)
@@ -370,6 +370,7 @@ void mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new);
 /* MIR printing */
 
 void mir_print_instruction(midgard_instruction *ins);
+void mir_print_bundle(midgard_bundle *ctx);
 void mir_print_block(midgard_block *block);
 void mir_print_shader(compiler_context *ctx);
 
index 348650ecf30a237b5d991491d79c7c9bf13c641d..6e10429cceea788daabaf764bae642bca1cbacee 100644 (file)
@@ -122,3 +122,16 @@ mir_print_shader(compiler_context *ctx)
                 mir_print_block(block);
         }
 }
+
+void
+mir_print_bundle(midgard_bundle *bundle)
+{
+        printf("[\n");
+
+        for (unsigned i = 0; i < bundle->instruction_count; ++i) {
+                midgard_instruction *ins = bundle->instructions[i];
+                mir_print_instruction(ins);
+        }
+
+        printf("]\n");
+}