nir: Add a pass for selectively lowering variables to scratch space

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [intel.com] - 12 April 2019 22:59 EDT

This commit adds new nir_load/store_scratch opcodes which read and write a virtual scratch space. It's up to the back-end to figure out what to do with it and where to put the actual scratch data.

v2: Drop const_index comments (by anholt)

18ed82b084c nir: Add a pass for selectively lowering variables to scratch space
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 8 ++
src/compiler/nir/nir_clone.c | 1 +
src/compiler/nir/nir_intrinsics.py | 5 +-
src/compiler/nir/nir_lower_io.c | 2 +
src/compiler/nir/nir_lower_scratch.c | 195 +++++++++++++++++++++++++++++++++++
src/compiler/nir/nir_print.c | 2 +
src/compiler/nir/nir_serialize.c | 2 +
9 files changed, 216 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share