diff options
-rw-r--r-- | src/compiler/glsl/ast.h | 8 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser.yy | 1 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index eee22482812..2a38a4b1f73 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -28,6 +28,7 @@ #include "list.h" #include "glsl_parser_extras.h" #include "compiler/glsl_types.h" +#include "util/bitset.h" struct _mesa_glsl_parse_state; @@ -473,8 +474,11 @@ enum { struct ast_type_qualifier { DECLARE_RALLOC_CXX_OPERATORS(ast_type_qualifier); + DECLARE_BITSET_T(bitset_t, 128); + + union flags { + flags() : i(0) {} - union { struct { unsigned invariant:1; unsigned precise:1; @@ -636,7 +640,7 @@ struct ast_type_qualifier { q; /** \brief Set of flags, accessed as a bitmask. */ - uint64_t i; + bitset_t i; } flags; /** Precision of the type (highp/medium/lowp). */ diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index 19147c7a3ec..4faf9602a08 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -96,6 +96,7 @@ static bool match_layout_qualifier(const char *s1, const char *s2, %parse-param {struct _mesa_glsl_parse_state *state} %union { + YYSTYPE() {} int n; int64_t n64; float real; diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 81d74e92ce3..106417c5c30 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -1011,7 +1011,7 @@ _mesa_ast_process_interface_block(YYLTYPE *locp, "an instance name are not allowed"); } - uint64_t interface_type_mask; + ast_type_qualifier::bitset_t interface_type_mask; struct ast_type_qualifier temp_type_qualifier; /* Get a bitmask containing only the in/out/uniform/buffer @@ -1030,7 +1030,7 @@ _mesa_ast_process_interface_block(YYLTYPE *locp, * production rule guarantees that only one bit will be set (and * it will be in/out/uniform). */ - uint64_t block_interface_qualifier = q.flags.i; + ast_type_qualifier::bitset_t block_interface_qualifier = q.flags.i; block->default_layout.flags.i |= block_interface_qualifier; |