glsl: replace while loop with without_array function
authorTimothy Arceri <t_arceri@yahoo.com.au>
Tue, 19 Aug 2014 07:46:44 +0000 (21:46 -1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 27 Apr 2015 11:31:08 +0000 (21:31 +1000)
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/glsl/ast_to_hir.cpp

index 78369360f19a6c504f88cc38d170ce32c3f3f3e8..18b82e3bec992f3a305ad56398f22bdabfd52ff6 100644 (file)
@@ -3532,9 +3532,7 @@ ast_declarator_list::hir(exec_list *instructions,
              *    vectors. Vertex shader inputs cannot be arrays or
              *    structures."
              */
-            const glsl_type *check_type = var->type;
-            while (check_type->is_array())
-               check_type = check_type->element_type();
+            const glsl_type *check_type = var->type->without_array();
 
             switch (check_type->base_type) {
             case GLSL_TYPE_FLOAT: