summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorAndres Gomez <[email protected]>2016-11-14 17:46:05 +0200
committerAndres Gomez <[email protected]>2016-11-25 13:18:30 +0200
commit65df02c00287449efedc4ec3d57ceee38abaacdb (patch)
tree3bfe9e92d40b45b1c975075bc30c373e630981b0 /src/compiler/glsl/glsl_parser.yy
parentfe5c522edd2e809adc46d44d73a49574fc686929 (diff)
glsl: split default in layout qualifier merge
Currently, the default in layout qualifier merge performs specific validation and merge. We want to split out the validation from the merge so they can be done independently. Additionally, for simplification, the direction of the validation and merge is changed so the ast_type_qualifier calling the method is the one validated and merged against the default in qualifier. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser.yy')
-rw-r--r--src/compiler/glsl/glsl_parser.yy12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy
index a96989bee9b..82501af6456 100644
--- a/src/compiler/glsl/glsl_parser.yy
+++ b/src/compiler/glsl/glsl_parser.yy
@@ -2917,8 +2917,10 @@ layout_in_defaults:
_mesa_glsl_error(&@1, state, "duplicate layout(...) qualifiers");
YYERROR;
} else {
- if (!state->in_qualifier->
- merge_in_qualifier(& @1, state, $1, $$, false)) {
+ if (!$1.validate_in_qualifier(& @1, state)) {
+ YYERROR;
+ }
+ if (!$1.merge_into_in_qualifier(& @1, state, $$, false)) {
YYERROR;
}
$$ = $2;
@@ -2927,8 +2929,10 @@ layout_in_defaults:
| layout_qualifier IN_TOK ';'
{
$$ = NULL;
- if (!state->in_qualifier->
- merge_in_qualifier(& @1, state, $1, $$, true)) {
+ if (!$1.validate_in_qualifier(& @1, state)) {
+ YYERROR;
+ }
+ if (!$1.merge_into_in_qualifier(& @1, state, $$, true)) {
YYERROR;
}
}