diff options
author | Andres Gomez <[email protected]> | 2016-10-07 01:52:06 +0300 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2016-11-25 13:18:30 +0200 |
commit | e5041c64094255fae6ca7327cfd75a7595442478 (patch) | |
tree | 3e72bc58e990d3bf1b3a98230cbb0db7dfcd1e08 /src/compiler/glsl/ast.h | |
parent | 5132d0c7b695d838617bf586e730899c65361668 (diff) |
glsl: push layout-qualifier-name values from variable declarations to global
After the previous modifications in the merging of the
layout-qualifier-name values, we no longer push the final value in a
declaration to the global values.
This regression happens because we don't call for merging on the
right-most layout qualifier of a declaration which is also the
overriding one in case of multiple appearances.
Now, we add a new method to push these values to the global ones and
we call for this just after all the layout-qualifier collapsing has
happened in a declaration.
This simplifies how this was working in two ways; we make a clear
differentiation of when we are pushing this to the global values since
before it was mixed in the merging call and we only run this once all
the processing for layout-qualifiers in a declaration has happened.
Reviewed-by: Timothy Arceri <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast.h')
-rw-r--r-- | src/compiler/glsl/ast.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index e40387b8f65..d8b425c5981 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -782,6 +782,12 @@ struct ast_type_qualifier { _mesa_glsl_parse_state *state, ast_node* &node); + /** + * Push pending layout qualifiers to the global values. + */ + bool push_to_global(YYLTYPE *loc, + _mesa_glsl_parse_state *state); + bool validate_flags(YYLTYPE *loc, _mesa_glsl_parse_state *state, const ast_type_qualifier &allowed_flags, |