From ca9e280d897a307c485ef4dc7163e1f6900dc768 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 18 Aug 2014 21:46:44 -1000 Subject: glsl: replace while loop with without_array function Signed-off-by: Timothy Arceri Reviewed-by: Ilia Mirkin --- src/glsl/ast_to_hir.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 78369360f19..18b82e3bec9 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -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: -- cgit v1.2.3