summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-07-06 15:21:53 -0700
committerEric Anholt <eric@anholt.net>2016-07-12 15:47:25 -0700
commit6858f059246b2cf6b969b050154dcb7307a03833 (patch)
treece67e9ee67849a3ae7039756078784a452185112 /src/gallium/drivers/vc4/vc4_program.c
parente8959ba7afbda7a23805072efc15c6f11449103e (diff)
downloadexternal_mesa3d-6858f059246b2cf6b969b050154dcb7307a03833.zip
external_mesa3d-6858f059246b2cf6b969b050154dcb7307a03833.tar.gz
external_mesa3d-6858f059246b2cf6b969b050154dcb7307a03833.tar.bz2
vc4: Also enable phi elimination.
This avoids a bunch of code gen regressions when enabling loops in vc4. Prior to that, the GLSL that would have generated these optimizable phi nodes was being lowered to csels between either (undef, a) or (a, a), and those were being dealt with by nir_opt_undef and nir_opt_algebraic.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 8305459..20e2850 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1336,6 +1336,7 @@ vc4_optimize_nir(struct nir_shader *s)
NIR_PASS_V(s, nir_lower_phis_to_scalar);
NIR_PASS(progress, s, nir_copy_prop);
+ 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_opt_cse);