glsl/nir: Fix getting the sampler dim when arrays are involved
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 19 Jun 2019 17:00:39 +0000 (10:00 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 19 Jun 2019 19:50:39 +0000 (12:50 -0700)
commitd7ea433a5fc13ef1f622fddf01afb1f1de7bc6b4
tree981036a4d8044a154043fd90ea06dc11591818dc
parent10e8d466011076a0453368cb976d9f6b06af0e94
glsl/nir: Fix getting the sampler dim when arrays are involved

Unwrap any array in the variable type so we can get the sampler dim.

This fixes piglit test
spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test.

Fixes: f2d0e48ddc7 "glsl/nir: Add optimization pass for access flags"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/gl_nir_opt_access.c