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: f2d0e48ddc
"glsl/nir: Add optimization pass for access flags"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
10e8d46601
commit
d7ea433a5f
|
@ -70,7 +70,8 @@ gather_intrinsic(struct access_state *state, nir_intrinsic_instr *instr)
|
|||
* image types use textures which cannot alias with buffer objects.
|
||||
* Therefore we have to group buffer samplers together with SSBO's.
|
||||
*/
|
||||
if (glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_BUF)
|
||||
if (glsl_get_sampler_dim(glsl_without_array(var->type)) ==
|
||||
GLSL_SAMPLER_DIM_BUF)
|
||||
state->buffers_written = true;
|
||||
else
|
||||
state->images_written = true;
|
||||
|
|
Loading…
Reference in New Issue