[Mesa-dev] [PATCH 3/6] glsl: replace while loop with new convenience function
Timothy Arceri
t_arceri at yahoo.com.au
Mon May 12 04:16:29 PDT 2014
Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
src/glsl/ast_to_hir.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 7516c33..3529314 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -3390,9 +3390,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->outermost_element_type();
switch (check_type->base_type) {
case GLSL_TYPE_FLOAT:
--
1.9.0
More information about the mesa-dev
mailing list