pan/mdg: Use the helper invo analyze passes
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 12 May 2020 17:26:32 +0000 (13:26 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 12 May 2020 22:30:41 +0000 (22:30 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014>

src/panfrost/midgard/midgard_compile.c

index 8ec29cf6bbe27990e81b105b25877e8009e2a307..e144dd72b2a78bed66a21f54dc6ac9cfe12e680e 100644 (file)
@@ -2627,6 +2627,11 @@ midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_b
         if (ctx->stage == MESA_SHADER_FRAGMENT)
                 mir_add_writeout_loops(ctx);
 
+        /* Analyze now that the code is known but before scheduling creates
+         * pipeline registers which are harder to track */
+        mir_analyze_helper_terminate(ctx);
+        mir_analyze_helper_requirements(ctx);
+
         /* Schedule! */
         midgard_schedule_program(ctx);
         mir_ra(ctx);