nir: Add a load_global_constant intrinsic
authorJason Ekstrand <jason@jlekstrand.net>
Sat, 29 Aug 2020 05:59:22 +0000 (00:59 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Sep 2020 20:50:03 +0000 (20:50 +0000)
commitff124e3fe3e89c594b91e62d3e233cfc2af3ef34
tree92fef5c39794020645b0772ca01a13471bb64cd6
parente4f07f8bdc602bae665fd57bb69e293a69d89bef
nir: Add a load_global_constant intrinsic

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.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
src/compiler/nir/nir_divergence_analysis.c
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_lower_io.c
src/compiler/nir/nir_lower_phis_to_scalar.c
src/compiler/nir/nir_opt_gcm.c
src/compiler/nir/nir_opt_shrink_vectors.c
src/compiler/nir/nir_validate.c