From: Timothy Arceri Date: Tue, 19 Aug 2014 07:46:44 +0000 (-1000) Subject: glsl: replace while loop with without_array function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca9e280d897a307c485ef4dc7163e1f6900dc768;p=mesa.git glsl: replace while loop with without_array function Signed-off-by: Timothy Arceri Reviewed-by: Ilia Mirkin --- 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: