glsl: validate binding qualifier for AoA
authorTimothy Arceri <t_arceri@yahoo.com.au>
Wed, 27 May 2015 11:33:45 +0000 (21:33 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Sat, 26 Sep 2015 12:28:05 +0000 (22:28 +1000)
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ast_to_hir.cpp

index 6b2e140cf43334058f7bc7d64aba6e23ba4a5235..b8d66dd06092fcae28d11b24b7e52c7cd2894aa0 100644 (file)
@@ -2179,7 +2179,7 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state,
    }
 
    const struct gl_context *const ctx = state->ctx;
-   unsigned elements = type->is_array() ? type->length : 1;
+   unsigned elements = type->is_array() ? type->arrays_of_arrays_size() : 1;
    unsigned max_index = qual->binding + elements - 1;
    const glsl_type *base_type = type->without_array();