summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <[email protected]>2015-09-03 09:47:56 +0200
committerSamuel Iglesias Gonsalvez <[email protected]>2015-09-25 08:39:21 +0200
commit9c1f10b1bc548a00482a0b6b789c4cdb12f5302e (patch)
treec0159c9fe19a74ca1ff6993b1c0347bfa1e63182 /src/glsl/glsl_parser.yy
parent130031168de44e38e84000f279951ef70a99cb66 (diff)
glsl: ignore default qualifier declarations when checking for duplicate layout qualifiers
Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r--src/glsl/glsl_parser.yy5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 4dd5384dac8..42108a3c1b6 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -2599,7 +2599,8 @@ interface_block:
{
ast_interface_block *block = (ast_interface_block *) $2;
- if (!state->has_420pack() && block->layout.has_layout()) {
+ if (!state->has_420pack() && block->layout.has_layout() &&
+ !block->layout.is_default_qualifier) {
_mesa_glsl_error(&@1, state, "duplicate layout(...) qualifiers");
YYERROR;
}
@@ -2608,6 +2609,8 @@ interface_block:
YYERROR;
}
+ block->layout.is_default_qualifier = false;
+
foreach_list_typed (ast_declarator_list, member, link, &block->declarations) {
ast_type_qualifier& qualifier = member->type->qualifier;
if (qualifier.flags.q.stream && qualifier.stream != block->layout.stream) {