diff options
author | Timothy Arceri <[email protected]> | 2016-01-15 11:01:25 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-01-20 08:06:29 +1100 |
commit | c8b8c578d145f90794611602eb66fc7d3f1df033 (patch) | |
tree | c0bcad7e0c9b4a7667a5df2fd27d6800b37fb190 | |
parent | 866a6bf9f70625517d6d2c17be9523b9f035f1db (diff) |
glsl: allow duplicate layout-qualifier-names
This is added by ARB_enhanced_layouts although it doesn't fit
into any of the six main changes so we enable this independently.
From the ARB_enhanced_layouts spec:
"More than one layout qualifier may appear in a single
declaration. Additionally, the same layout-qualifier-name
can occur multiple times within a layout qualifier or across
multiple layout qualifiers in the same declaration"
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
-rw-r--r-- | src/glsl/ast_type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp index 1f675b28ae8..4e750161b48 100644 --- a/src/glsl/ast_type.cpp +++ b/src/glsl/ast_type.cpp @@ -157,7 +157,8 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, allowed_duplicates_mask.flags.i |= stream_layout_mask.flags.i; - if ((this->flags.i & q.flags.i & ~allowed_duplicates_mask.flags.i) != 0) { + if (!state->has_enhanced_layouts() && + (this->flags.i & q.flags.i & ~allowed_duplicates_mask.flags.i) != 0) { _mesa_glsl_error(loc, state, "duplicate layout qualifiers used"); return false; |