[Mesa-dev] [PATCH 6/9] glsl: push layout-qualifier-name values from variable declarations to global
agomez at igalia.com
Tue Oct 25 15:30:43 UTC 2016
On Mon, 2016-10-24 at 13:44 +1100, Timothy Arceri wrote:
> On Sat, 2016-10-22 at 23:09 +0300, Andres Gomez wrote:
> > After the previous modifications in the merging of the
> > layout-qualifier-name values, we no longer push the final value in a
> > declaration to the global values.
> > This regression happens because we don't call for merging on the
> > right-most layout qualifier of a declaration which is also the
> > overriding one in case of multiple appearances.
> I'm a little confused about this change. How do all the other layout
> qualifiers get set if we are not calling merge on the rightmost
The rightmost qualifier doesn't call merge because it doesn't have
anything against to which merge. The non-rightmost qualifiers are the
ones needing to merge, because there is a qualifier to their right.
> > Now, we add a new method to push these values to the global ones and
> > we call for this just after all the layout-qualifier collapsing has
> > happened in a declaration.
Previously, merge had also a code path to push some values to the
global variables. As merge doesn't always happen, the push was not
happening and hence the need to split that code path out. In addition,
it was a bit messing to have that in "merge_qualifier". I believe now
it clearer what's going on.
> > This simplifies how this was working in two ways; we make a clear
> > differentiation of when we are pushing this to the global values
> > since
> > before it was mixed in the merging call and we only run this once all
> > the processing for layout-qualifiers in a declaration has happened.
More information about the mesa-dev