lavapipe: run nir_opt_copy_prop_vars during optimization loop
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 10 Mar 2022 16:16:03 +0000 (11:16 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 10 Mar 2022 20:40:56 +0000 (20:40 +0000)
this enables better elimination of operations

fixes:
dEQP-VK.graphicsfuzz.spv-stable-mergesort-flatten-selection-dead-continues

fixes #5458

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15322>

src/gallium/frontends/lavapipe/lvp_pipeline.c

index a742358..0ac79f8 100644 (file)
@@ -709,6 +709,8 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
       NIR_PASS(progress, nir, nir_opt_deref);
       NIR_PASS(progress, nir, nir_lower_vars_to_ssa);
 
+      NIR_PASS(progress, nir, nir_opt_copy_prop_vars);
+
       NIR_PASS(progress, nir, nir_copy_prop);
       NIR_PASS(progress, nir, nir_opt_dce);
       NIR_PASS(progress, nir, nir_opt_peephole_select, 8, true, true);