nir: support indirect indexing samplers in struct arrays
authorTimothy Arceri <t_arceri@yahoo.com.au>
Wed, 26 Aug 2015 12:18:36 +0000 (22:18 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 17 Sep 2015 01:28:34 +0000 (11:28 +1000)
commitef8eebc6ad5d86e524426f0755c0f7d0b4c0cd3e
tree498d4219da5b401307a4c71501d5acd3e04ae9f0
parent0ad44ce3735aa39391ab866c6a692eb76115b8c1
nir: support indirect indexing samplers in struct arrays

As a bonus we get indirect support for arrays of arrays for free.

V5: couple of small clean-ups suggested by Jason.

V4: fix struct member location caclulation, use nir_ssa_def rather than
nir_src for the indirect as suggested by Jason

V3: Use nir_instr_rewrite_src() with empty src rather then clearing
the use_link list directly for the old indirects as suggested by Jason

V2: Fixed validation error in debug build

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir_lower_samplers.cpp