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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14888>
This commit is contained in:
Alyssa Rosenzweig 2022-02-04 17:35:44 -05:00 committed by Marge Bot
parent b707dabbac
commit ff970767a3

View file

@ -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);