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

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)

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Jason Ekstrand
2016-12-02 11:36:42 -08:00
committed by Eric Anholt
parent 8a2d91e124
commit 18ed82b084
9 changed files with 216 additions and 1 deletions

View File

@@ -143,6 +143,7 @@ files_libnir = files(
'nir_lower_phis_to_scalar.c',
'nir_lower_regs_to_ssa.c',
'nir_lower_returns.c',
'nir_lower_scratch.c',
'nir_lower_subgroups.c',
'nir_lower_system_values.c',
'nir_lower_tex.c',