diff options
author | Eric Anholt <[email protected]> | 2012-04-18 13:35:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-07-09 11:13:33 -0700 |
commit | 2d03f48a65a666ecdcfaffa3d39ad1b77f2b25b6 (patch) | |
tree | a35c16d15d788dcbd3926e1f59c09ae3c0e822d3 /src/glsl/ast.h | |
parent | 912a429bc529a017a426f06631b31da1c0eaa3ae (diff) |
glsl: Add parsing for GLSL uniform blocks.
This doesn't do anything with the uniform block declarations yet, so
usage of those uniforms finds them to be undeclared.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 7538b58e460..4438b85bbda 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -376,6 +376,15 @@ struct ast_type_qualifier { unsigned depth_less:1; unsigned depth_unchanged:1; /** \} */ + + /** \name Layout qualifiers for GL_ARB_uniform_buffer_object */ + /** \{ */ + unsigned std140:1; + unsigned shared:1; + unsigned packed:1; + unsigned column_major:1; + unsigned row_major:1; + /** \} */ } /** \brief Set of flags, accessed by name. */ q; @@ -762,6 +771,25 @@ public: ast_function *prototype; ast_compound_statement *body; }; + +class ast_uniform_block : public ast_node { +public: + ast_uniform_block(ast_type_qualifier layout, + const char *block_name, + ast_declarator_list *member_list) + : layout(layout), block_name(block_name) + { + declarations.push_degenerate_list_at_head(&member_list->link); + } + + virtual ir_rvalue *hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state); + + ast_type_qualifier layout; + const char *block_name; + /** List of ast_declarator_list * */ + exec_list declarations; +}; /*@}*/ extern void |