nir: Add a nir_lower_load_const_to_scalar() pass.
authorEric Anholt <eric@anholt.net>
Tue, 4 Aug 2015 00:20:33 +0000 (17:20 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 5 Aug 2015 03:03:10 +0000 (20:03 -0700)
commit6c28ee20410afe97dd441b0c9c680b26eb4072fc
tree70327b3febc82959888aab103ce6d1a5738e4630
parent45248d3640f5a0356085e26c44548bf3af5dec0f
nir: Add a nir_lower_load_const_to_scalar() pass.

This is useful to increase the CSE opportunities for a scalar backend.  It
avoids regressions when dropping vc4's custom CSE implementation.

v2: Cleanups by Matt (decl in the for loop, and unreachable()).
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/Makefile.sources
src/glsl/nir/nir.h
src/glsl/nir/nir_lower_load_const_to_scalar.c [new file with mode: 0644]