summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r--src/glsl/ast.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 7d7f72d54a4..1a28963c437 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -804,12 +804,12 @@ public:
class ast_uniform_block : public ast_node {
public:
ast_uniform_block(ast_type_qualifier layout,
- const char *block_name,
- ast_declarator_list *member_list,
- const char *instance_name)
- : layout(layout), block_name(block_name), instance_name(instance_name)
+ const char *instance_name,
+ ast_expression *array_size)
+ : layout(layout), block_name(NULL), instance_name(instance_name),
+ array_size(array_size)
{
- declarations.push_degenerate_list_at_head(&member_list->link);
+ /* empty */
}
virtual ir_rvalue *hir(exec_list *instructions,
@@ -828,6 +828,17 @@ public:
/** List of ast_declarator_list * */
exec_list declarations;
+
+ /**
+ * Declared array size of the block instance
+ *
+ * If the block is not declared as an array, this field will be \c NULL.
+ *
+ * \note
+ * A block can only be an array if it also has an instance name. If this
+ * field is not \c NULL, ::instance_name must also not be \c NULL.
+ */
+ ast_expression *array_size;
};
/*@}*/