summaryrefslogtreecommitdiffstats
path: root/src/glsl/Makefile.sources
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-04-02 21:24:38 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-04-07 14:34:14 -0700
commitde2014cf1e12826a53a1132f6d80c889f375b2e8 (patch)
treeeed7f1dccb0d60a66e219a7366de2a5f9724099a /src/glsl/Makefile.sources
parent4f4b04b7c7ee1ce27da990190a740473db0f2ecb (diff)
downloadexternal_mesa3d-de2014cf1e12826a53a1132f6d80c889f375b2e8.zip
external_mesa3d-de2014cf1e12826a53a1132f6d80c889f375b2e8.tar.gz
external_mesa3d-de2014cf1e12826a53a1132f6d80c889f375b2e8.tar.bz2
nir: Allocate dereferences out of their parent instruction or deref.
Jason pointed out that variable dereferences in NIR are really part of their parent instruction, and should have the same lifetime. Unlike in GLSL IR, they're not used very often - just for intrinsic variables, call parameters & return, and indirect samplers for texturing. Also, nir_deref_var is the top-level concept, and nir_deref_array/nir_deref_record are child nodes. This patch attempts to allocate nir_deref_vars out of their parent instruction, and any sub-dereferences out of their parent deref. It enforces these restrictions in the validator as well. This means that freeing an instruction should free its associated dereference chain as well. The memory sweeper pass can also happily ignore them. v2: Rename make_deref to evaluate_deref and make it take a nir_instr * instead of void *. This involves adding &instr->instr everywhere. (Requested by Jason Ekstrand.) Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/glsl/Makefile.sources')
0 files changed, 0 insertions, 0 deletions