OSDN Git Service

vc4: Scalarize phi nodes as well.
authorEric Anholt <eric@anholt.net>
Fri, 22 Apr 2016 23:03:07 +0000 (16:03 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 2 May 2016 18:06:29 +0000 (11:06 -0700)
This makes fewer programs with loops assertion fail, replacing them with
the rendering failure warning.

src/gallium/drivers/vc4/vc4_program.c

index 4cee99f..692d9d6 100644 (file)
@@ -1368,6 +1368,7 @@ vc4_optimize_nir(struct nir_shader *s)
 
                 NIR_PASS_V(s, nir_lower_vars_to_ssa);
                 NIR_PASS_V(s, nir_lower_alu_to_scalar);
+                NIR_PASS_V(s, nir_lower_phis_to_scalar);
 
                 NIR_PASS(progress, s, nir_copy_prop);
                 NIR_PASS(progress, s, nir_opt_dce);