nir: Add a load_global_constant intrinsic

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [jlekstrand.net] - 1 September 2020 20:50 UTC

This has the same semantics as load_global except the memory it reads is known to be constant so load_global_constant intrinsics can be CSEd rather than relying on more complex copy-propagation.

ff124e3fe3e nir: Add a load_global_constant intrinsic
src/compiler/nir/nir_divergence_analysis.c | 1 +
src/compiler/nir/nir_intrinsics.py | 3 +++
src/compiler/nir/nir_lower_io.c | 1 +
src/compiler/nir/nir_lower_phis_to_scalar.c | 1 +
src/compiler/nir/nir_opt_gcm.c | 1 +
src/compiler/nir/nir_opt_shrink_vectors.c | 1 +
src/compiler/nir/nir_validate.c | 1 +
7 files changed, 9 insertions(+)

Upstream: cgit.freedesktop.org


  • Share