diff options
author | Timothy Arceri <[email protected]> | 2015-10-15 14:32:41 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-10-15 20:35:45 +1100 |
commit | 3129359ed7461b90fe6ea70641ec7a858dd656de (patch) | |
tree | aee6cb5dcc219bd053324c205f156b7667ad9fae /src/glsl/ast_array_index.cpp | |
parent | 296a7ea471fd327ab60d9723bd395e6b34dc9334 (diff) |
glsl: allow AoA to be sized by initializer or constructor
V2: Split out unsized array validation to its own patch as
suggested by Samuel.
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/glsl/ast_array_index.cpp')
-rw-r--r-- | src/glsl/ast_array_index.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp index 5e8f49d70b0..7855e0a6190 100644 --- a/src/glsl/ast_array_index.cpp +++ b/src/glsl/ast_array_index.cpp @@ -28,13 +28,10 @@ void ast_array_specifier::print(void) const { - if (this->is_unsized_array) { - printf("[ ] "); - } - foreach_list_typed (ast_node, array_dimension, link, &this->array_dimensions) { printf("[ "); - array_dimension->print(); + if (((ast_expression*)array_dimension)->oper != ast_unsized_array_dim) + array_dimension->print(); printf("] "); } } |