summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-08-15 11:05:57 -0700
committerIan Romanick <ian.d.romanick@intel.com>2013-08-22 11:48:26 -0700
commite14baf425b6bd55198642adccf7a169850c37c86 (patch)
tree1743587216b96167af0ac287c5088a4270f2044e
parentdce3865306b11df1f92f0b54a34c35ea945ee293 (diff)
glsl: Rename ubo_qualifiers_valid to ubo_qualifiers_allowed.
The variable means that UBO qualifiers are allowed in a particular context (e.g., not allowed in a struct field declaration), rather than a particular set of UBO qualifiers are valid. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> (cherry picked from commit 1a45db97058d63b742993d0fcf0e5df44e2aa1c6)
-rw-r--r--src/glsl/ast.h2
-rw-r--r--src/glsl/ast_to_hir.cpp6
-rw-r--r--src/glsl/glsl_parser.yy2
-rw-r--r--src/glsl/glsl_parser_extras.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index a5ee5403f47..f25f02b7a60 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -632,7 +632,7 @@ public:
* Flag indicating that these declarators are in a uniform block,
* allowing UBO type qualifiers.
*/
- bool ubo_qualifiers_valid;
+ bool ubo_qualifiers_allowed;
};
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index dd93144ffdf..0532e2f7e85 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1949,7 +1949,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
ir_variable *var,
struct _mesa_glsl_parse_state *state,
YYLTYPE *loc,
- bool ubo_qualifiers_valid,
+ bool ubo_qualifiers_allowed,
bool is_parameter)
{
if (qual->flags.q.invariant) {
@@ -2282,7 +2282,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
}
if (qual->flags.q.row_major || qual->flags.q.column_major) {
- if (!ubo_qualifiers_valid) {
+ if (!ubo_qualifiers_allowed) {
_mesa_glsl_error(loc, state,
"uniform block layout qualifiers row_major and "
"column_major can only be applied to uniform block "
@@ -2741,7 +2741,7 @@ ast_declarator_list::hir(exec_list *instructions,
}
apply_type_qualifier_to_variable(& this->type->qualifier, var, state,
- & loc, this->ubo_qualifiers_valid, false);
+ & loc, this->ubo_qualifiers_allowed, false);
if (this->type->qualifier.flags.q.invariant) {
if ((state->target == vertex_shader) &&
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 50e8e23590b..76b2495e577 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -2251,7 +2251,7 @@ member_declaration:
$$ = new(ctx) ast_declarator_list(type);
$$->set_location(yylloc);
- $$->ubo_qualifiers_valid = true;
+ $$->ubo_qualifiers_allowed = true;
$$->declarations.push_degenerate_list_at_head(& $2->link);
}
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index c16f71f2b61..d13ddd73831 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1199,7 +1199,7 @@ ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type)
{
this->type = type;
this->invariant = false;
- this->ubo_qualifiers_valid = false;
+ this->ubo_qualifiers_allowed = false;
}
void