[Mesa-dev] [PATCH 04/13] glsl: Split default in layout qualifier merge
Andres Gomez
agomez at igalia.com
Mon Nov 21 16:08:41 UTC 2016
On Thu, 2016-11-17 at 16:56 +1100, Timothy Arceri wrote:
> On Mon, 2016-11-14 at 19:15 +0200, Andres Gomez wrote:
...
> > diff --git a/src/compiler/glsl/glsl_parser.yy
> > b/src/compiler/glsl/glsl_parser.yy
> > index 50f7097..9f18c15 100644
> > --- a/src/compiler/glsl/glsl_parser.yy
> > +++ b/src/compiler/glsl/glsl_parser.yy
> > @@ -2913,8 +2913,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;
> > }
>
>
> To avoid regressions between patches the order should be merge then
> validate right?
No, the original code does first the validation and then the merge.
This swaps when the merging behavior changes, merging the default in
qualifier as the last step in patch 08/13. Then, we first merge and
afterwards validate on the resulting layout-qualifier.
--
Br,
Andres
More information about the mesa-dev
mailing list