mesa/src/compiler
Connor Abbott c62b58c216 nir: fix bug with moves in nir_opt_remove_phis()
In 144cbf8 ("nir: Make nir_opt_remove_phis see through moves."), Ken
made nir_opt_remove_phis able to coalesce phi nodes whose sources are
all moves with the same swizzle. However, he didn't add the logic
necessary for handling the fact that the phi may now have multiple
different sources, even though the sources point to the same thing. For
example, if we had something like:

if (...)
   a1 = b.yx;
else
   a2 = b.yx;
a = phi(a1, a2)
... = a

then we would rewrite it to

if (...)
   a1 = b.yx;
else
   a2 = b.yx;
... = a1

by picking a random phi source, which in this case is invalid because
the source doesn't dominate the phi. Instead, we need to change it to:

if (...)
   a1 = b.yx;
else
   a2 = b.yx;
a3 = b.yx;
... = a3;

Fixes 12 CTS tests:
ES31-CTS.functional.tessellation.invariance.outer_edge_symmetry.quads*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-09-03 00:37:48 -04:00
..
glsl glsl: expose max atomic counter/buffer consts for tess in ES 3.2 2016-09-03 00:26:36 -04:00
nir nir: fix bug with moves in nir_opt_remove_phis() 2016-09-03 00:37:48 -04:00
spirv spirv: replace assert with unreachable 2016-08-30 09:29:26 +10:00
.gitignore mesa: Add .gitignore entries for make check binaries 2016-05-25 09:41:44 -07:00
Android.glsl.gen.mk glsl: Make the generated sources build rules more like NIR 2016-08-17 13:48:25 +01:00
Android.glsl.mk android: libmesa_glsl: add a dependency on libmesa_nir static 2016-06-02 22:31:00 +01:00
Android.mk compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
Android.nir.gen.mk compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
Android.nir.mk compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
builtin_type_macros.h glsl/types: Add a bare "sampler" type 2016-02-13 17:22:36 -08:00
glsl_types.cpp glsl/types: disallow implicit conversions before GLSL 1.20 2016-08-05 14:27:03 +03:00
glsl_types.h glsl: Document and enforce restriction on type values 2016-07-05 17:55:29 -07:00
Makefile.am compiler: Move glsl_to_nir to libglsl.la 2016-05-26 14:13:38 -07:00
Makefile.glsl.am glsl: Use the generated constant expression code 2016-08-30 16:28:03 -07:00
Makefile.nir.am nir: add the SConscript.nir to the tarball 2016-05-30 19:19:01 +01:00
Makefile.sources glsl: Use the generated constant expression code 2016-08-30 16:28:03 -07:00
nir_types.cpp nir: add glsl_dvec_type() helper 2016-07-06 23:20:23 -07:00
nir_types.h nir: add glsl_dvec_type() helper 2016-07-06 23:20:23 -07:00
SConscript glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
SConscript.glsl scons: Fix MinGW cross compilation. 2016-08-31 12:18:34 +01:00
SConscript.nir glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
shader_enums.c glsl: add gl_BoundingBox and associated varying slots 2016-08-30 20:25:15 -04:00
shader_enums.h glsl: add gl_BoundingBox and associated varying slots 2016-08-30 20:25:15 -04:00