summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2014-01-23 23:20:25 +1100
committerTimothy Arceri <[email protected]>2014-01-23 23:37:36 +1100
commit3d492f19f6e1a50a645cfa3b04d64808d44af5e3 (patch)
tree39c4bf58ad3524e8fa697617c89b132ed5c7b297
parent3dc932d45048843d83b0f0207043d713f7bceb3c (diff)
glsl: Allow arrays of arrays as input to vertex shader
Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Paul Berry <[email protected]>
-rw-r--r--src/glsl/ast_to_hir.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index be12f97c3be..f13ac51c164 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -3143,8 +3143,9 @@ ast_declarator_list::hir(exec_list *instructions,
* vectors. Vertex shader inputs cannot be arrays or
* structures."
*/
- const glsl_type *check_type = var->type->is_array()
- ? var->type->fields.array : var->type;
+ const glsl_type *check_type = var->type;
+ while (check_type->is_array())
+ check_type = check_type->element_type();
switch (check_type->base_type) {
case GLSL_TYPE_FLOAT: