glsl: Rename ubo_qualifiers_valid to ubo_qualifiers_allowed.
authorMatt Turner <mattst88@gmail.com>
Thu, 15 Aug 2013 18:05:57 +0000 (11:05 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 22 Aug 2013 05:47:02 +0000 (22:47 -0700)
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>
src/glsl/ast.h
src/glsl/ast_to_hir.cpp
src/glsl/glsl_parser.yy
src/glsl/glsl_parser_extras.cpp

index 335374de16b94aab4c9f1e2df9e5ce1f066b821b..d227febd71e71560bb4b8fdb9a6a3b9298ca3d53 100644 (file)
@@ -644,7 +644,7 @@ public:
     * Flag indicating that these declarators are in a uniform block,
     * allowing UBO type qualifiers.
     */
-   bool ubo_qualifiers_valid;
+   bool ubo_qualifiers_allowed;
 };
 
 
index d94faa885b5a11bb38af201e2cd60dfe8ccf7d00..06b3a521299ef11d76195d281d956798c312cb7d 100644 (file)
@@ -1951,7 +1951,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)
 {
    STATIC_ASSERT(sizeof(qual->flags.q) <= sizeof(qual->flags.i));
@@ -2297,7 +2297,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 "
@@ -2852,7 +2852,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) &&
index e3a57ea0251e4ac7b9831310f3e0b47ab396c5c6..0ed34538bc9ee2d8772fd8c90faf5a7dc0c83213 100644 (file)
@@ -2295,7 +2295,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);
    }
index a97b3d934c5bed179d1c3428eadb95b00604af9a..6976b09dd18e0fd0f0d7528b1e1302703eb871ca 100644 (file)
@@ -1171,7 +1171,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