radeonsi/nir: implement pipe_screen::finalize_nir
[mesa.git] / src / gallium / drivers / radeonsi / si_state_shaders.c
index 04ff331444b3077552af5cb86c9a670570195870..e5e7d523cd44d7b2419a9f8ebe9b03d2bdd95ee9 100644 (file)
@@ -2472,9 +2472,6 @@ static void si_init_shader_selector_async(void *job, int thread_index)
        assert(thread_index < ARRAY_SIZE(sscreen->compiler));
        compiler = &sscreen->compiler[thread_index];
 
-       if (sel->nir)
-               si_lower_nir(sel->screen, sel->nir);
-
        /* Compile the main shader part for use with a prolog and/or epilog.
         * If this fails, the driver will try to compile a monolithic shader
         * on demand.
@@ -2715,10 +2712,9 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
                        sel->nir = state->ir.nir;
                }
 
-               si_nir_lower_ps_inputs(sel->nir);
-               si_nir_opts(sel->nir);
                si_nir_scan_shader(sel->nir, &sel->info);
                si_nir_scan_tess_ctrl(sel->nir, &sel->tcs_info);
+               si_nir_adjust_driver_locations(sel->nir);
        }
 
        sel->type = sel->info.processor;