diff options
author | Timothy Arceri <[email protected]> | 2016-01-15 12:43:10 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-01-20 08:06:50 +1100 |
commit | 6a660a5f5dad02a6594ea905c511ba3cae6862a5 (patch) | |
tree | 0041c81a83867d5741f7d7456abba01c74a48223 /src/glsl/ast.h | |
parent | 564009986ff1485c467664542a9042e6ce4dcdfe (diff) |
glsl: allow multiple layout qualifiers for a single declaration
From the ARB_shading_language_420pack spec:
"More than one layout qualifier may appear in a single
declaration. If the same layout-qualifier-name occurs in
multiple layout qualifiers for the same declaration, the
last one overrides the former ones."
The parser was already failing correctly when the extension is
not available but testing for duplicates within a single layout
qualifier was still causing this to fail when available as both
cases share the same function for merging.
Here we add a parameter to differentiate between the two uses
and apply it to the duplicate test.
Acked-by: Matt Turner <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 465166994ea..03df6c08b2b 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -699,7 +699,8 @@ struct ast_type_qualifier { bool merge_qualifier(YYLTYPE *loc, _mesa_glsl_parse_state *state, - const ast_type_qualifier &q); + const ast_type_qualifier &q, + bool is_single_layout_merge); bool merge_out_qualifier(YYLTYPE *loc, _mesa_glsl_parse_state *state, |