glsl: Allow arrays of arrays as input to vertex shader
authorTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 23 Jan 2014 12:20:25 +0000 (23:20 +1100)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 23 Jan 2014 12:37:36 +0000 (23:37 +1100)
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ast_to_hir.cpp

index be12f97c3bef322af6a03635582a84c786b59798..f13ac51c164f534417502141d6009e6388b68438 100644 (file)
@@ -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: