summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-10-15 14:32:41 +1100
committerTimothy Arceri <[email protected]>2015-10-15 20:35:45 +1100
commit3129359ed7461b90fe6ea70641ec7a858dd656de (patch)
treeaee6cb5dcc219bd053324c205f156b7667ad9fae /src/glsl/ast.h
parent296a7ea471fd327ab60d9723bd395e6b34dc9334 (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.h')
-rw-r--r--src/glsl/ast.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 67faacd0ef8..57d432d4b02 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -183,6 +183,7 @@ enum ast_operators {
ast_post_dec,
ast_field_selection,
ast_array_index,
+ ast_unsized_array_dim,
ast_function_call,
@@ -324,16 +325,7 @@ public:
class ast_array_specifier : public ast_node {
public:
- /** Unsized array specifier ([]) */
- explicit ast_array_specifier(const struct YYLTYPE &locp)
- : is_unsized_array(true)
- {
- set_location(locp);
- }
-
- /** Sized array specifier ([dim]) */
ast_array_specifier(const struct YYLTYPE &locp, ast_expression *dim)
- : is_unsized_array(false)
{
set_location(locp);
array_dimensions.push_tail(&dim->link);
@@ -346,11 +338,8 @@ public:
virtual void print(void) const;
- /* If true, this means that the array has an unsized outermost dimension. */
- bool is_unsized_array;
-
/* This list contains objects of type ast_node containing the
- * sized dimensions only, in outermost-to-innermost order.
+ * array dimensions in outermost-to-innermost order.
*/
exec_list array_dimensions;
};