Mesa (master): panfrost/midgard: Add mir_print_bundle helper
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 7 16:07:55 UTC 2019
Module: Mesa
Branch: master
Commit: c62f2ff8529df6b0f5351fb59e47cb0b31ffbad8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c62f2ff8529df6b0f5351fb59e47cb0b31ffbad8
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Thu Jun 6 11:18:30 2019 -0700
panfrost/midgard: Add mir_print_bundle helper
This helps with debugging scheduling/emission.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/gallium/drivers/panfrost/midgard/compiler.h | 1 +
src/gallium/drivers/panfrost/midgard/midgard_print.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/src/gallium/drivers/panfrost/midgard/compiler.h b/src/gallium/drivers/panfrost/midgard/compiler.h
index 5ee86b41601..18adbd00f5e 100644
--- a/src/gallium/drivers/panfrost/midgard/compiler.h
+++ b/src/gallium/drivers/panfrost/midgard/compiler.h
@@ -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);
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_print.c b/src/gallium/drivers/panfrost/midgard/midgard_print.c
index 348650ecf30..6e10429ccee 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_print.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_print.c
@@ -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");
+}
More information about the mesa-commit
mailing list