summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2014-08-18 21:46:44 -1000
committerTimothy Arceri <t_arceri@yahoo.com.au>2015-04-27 21:31:08 +1000
commitca9e280d897a307c485ef4dc7163e1f6900dc768 (patch)
tree8b2f6d012f15346e7c76b559c90d250956e22c8d /src/glsl/ast_to_hir.cpp
parentf00c5f85b82efe9535b18dbf97c4591fb28aeae6 (diff)
glsl: replace while loop with without_array function
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp4
1 files changed, 1 insertions, 3 deletions
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: