Mesa (main): pan/mdg: Print optimized and scheduled shader
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 18 15:28:39 UTC 2022
Module: Mesa
Branch: main
Commit: ff970767a309c79f2b5d1f86a336517a33bff341
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff970767a309c79f2b5d1f86a336517a33bff341
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Fri Feb 4 17:35:44 2022 -0500
pan/mdg: Print optimized and scheduled shader
To help identify problems across the compiler, print more forms of the shader
with MIDGARD_MESA_DEBUG=shaders. Roughly matches the Bifrost compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14888>
---
src/panfrost/midgard/midgard_compile.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index ce2ea2cbe7d..793612b7131 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -3287,10 +3287,16 @@ midgard_compile_shader_nir(nir_shader *nir,
* pipeline registers which are harder to track */
mir_analyze_helper_requirements(ctx);
+ if (midgard_debug & MIDGARD_DBG_SHADERS && !skip_internal)
+ mir_print_shader(ctx);
+
/* Schedule! */
midgard_schedule_program(ctx);
mir_ra(ctx);
+ if (midgard_debug & MIDGARD_DBG_SHADERS && !skip_internal)
+ mir_print_shader(ctx);
+
/* Analyze after scheduling since this is order-dependent */
mir_analyze_helper_terminate(ctx);
More information about the mesa-commit
mailing list