zink: run nir_lower_phis_to_scalar in optimization loop
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 8 Mar 2022 17:12:21 +0000 (12:12 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 8 Mar 2022 21:30:29 +0000 (21:30 +0000)
fixes (lavapipe):
dEQP-GLES3.functional.shaders.switch.switch_in_do_while_loop_dynamic*

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

src/gallium/drivers/zink/zink_compiler.c

index ec6aef0..46869b6 100644 (file)
@@ -387,6 +387,7 @@ optimize_nir(struct nir_shader *s)
       NIR_PASS(progress, s, nir_opt_remove_phis);
       NIR_PASS(progress, s, nir_opt_dce);
       NIR_PASS(progress, s, nir_opt_dead_cf);
+      NIR_PASS(progress, s, nir_lower_phis_to_scalar, false);
       NIR_PASS(progress, s, nir_opt_cse);
       NIR_PASS(progress, s, nir_opt_peephole_select, 8, true, true);
       NIR_PASS(progress, s, nir_opt_algebraic);