Module: Mesa
Branch: master
Commit: 1d401f9ce48f85b4340fcd4a591222aa165910f1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d401f9ce48f85b4340fcd4a591222aa165910f1

Author: Timothy Arceri <[email protected]>
Date:   Wed May 27 21:33:45 2015 +1000

glsl: validate binding qualifier for AoA

Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>

---

 src/glsl/ast_to_hir.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 6b2e140..b8d66dd 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -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();
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to