aboutsummaryrefslogtreecommitdiffstats
path: root/src/gbm
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-04-02 21:24:38 -0700
committerKenneth Graunke <[email protected]>2015-04-07 14:34:14 -0700
commitde2014cf1e12826a53a1132f6d80c889f375b2e8 (patch)
treeeed7f1dccb0d60a66e219a7366de2a5f9724099a /src/gbm
parent4f4b04b7c7ee1ce27da990190a740473db0f2ecb (diff)
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gbm')
0 files changed, 0 insertions, 0 deletions