lavapipe: scan shader for info before lowering images.

Otherwise the values will be wrong.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>
This commit is contained in:
Dave Airlie
2021-05-07 10:14:15 +10:00
committed by Marge Bot
parent 5036e0a08e
commit 0d41c4b3d9
@@ -470,6 +470,8 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
scan_pipeline_info(pipeline, nir);
optimize(nir);
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
lvp_lower_pipeline_layout(pipeline->device, pipeline->layout, nir);
NIR_PASS_V(nir, nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir), true, true);
@@ -511,8 +513,6 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
lvp_shader_optimize(nir);
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
if (nir->info.stage != MESA_SHADER_VERTEX)
nir_assign_io_var_locations(nir, nir_var_shader_in, &nir->num_inputs, nir->info.stage);
else {