summaryrefslogtreecommitdiffstats
path: root/src/glsl/Makefile.sources
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-08-04 16:25:24 -0700
committerEric Anholt <[email protected]>2015-08-14 11:39:18 -0700
commit9e6dc5b64d5e931c7ebc272096eccab102b75d76 (patch)
treec8e14e7821452cdea96d2f7072fe8d96dd20da9d /src/glsl/Makefile.sources
parentb346a84e270a50f0a8f1a6e474a51da04dd72f0e (diff)
nir: Add a nir_opt_undef() to handle csels with undef.
We may find a cause to do more undef optimization in the future, but for now this fixes up things after if flattening. vc4 was handling this internally most of the time, but a GLB2.7 shader that did a conditional discard and assign gl_FragColor in the else was still emitting some extra code. total instructions in shared programs: 100809 -> 100795 (-0.01%) instructions in affected programs: 37 -> 23 (-37.84%) v2: Use nir_instr_rewrite_src() to update def/use on src[0] (by Thomas Helland). v3: Make sure to flag metadata dirties, and copy the swizzle and abs/neg over to src[0], too (by anholt). Reviewed-by: Thomas Helland <[email protected]> (v2) Tested-by: Thomas Helland <[email protected]> (v2)
Diffstat (limited to 'src/glsl/Makefile.sources')
-rw-r--r--src/glsl/Makefile.sources1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index a0e85ed9e4a..0b77244ac03 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -56,6 +56,7 @@ NIR_FILES = \
nir/nir_opt_peephole_ffma.c \
nir/nir_opt_peephole_select.c \
nir/nir_opt_remove_phis.c \
+ nir/nir_opt_undef.c \
nir/nir_print.c \
nir/nir_remove_dead_variables.c \
nir/nir_search.c \