glsl: Add AoA support when checking for non-const index
authorTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 4 Jun 2015 01:19:05 +0000 (11:19 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 15 Oct 2015 10:42:24 +0000 (21:42 +1100)
When checking for non-const indexing of interfaces
take into account arrays of arrays

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/glsl/ast_array_index.cpp

index 5927c91079b0f22c9388618b50e98b301a1d3723..74d403fdb65320e6309ad9ab6f73218a707fe53a 100644 (file)
@@ -235,7 +235,7 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
                   ir_var_shader_storage) {
             _mesa_glsl_error(&loc, state, "unsized array index must be constant");
          }
-      } else if (array->type->fields.array->is_interface()
+      } else if (array->type->without_array()->is_interface()
                  && (array->variable_referenced()->data.mode == ir_var_uniform ||
                      array->variable_referenced()->data.mode == ir_var_shader_storage)
                  && !state->is_version(400, 0) && !state->ARB_gpu_shader5_enable) {