[Mesa-dev] [PATCH] centroid affects interpolation
Chris Forbes
chrisf at ijw.co.nz
Tue Feb 4 20:55:39 CET 2014
`centroid` has never been an interpolation qualifier, though.
In GLSL 1.20, `centroid varying` is a storage qualifier.
In GLSL 1.30, `centroid in`, `centroid out` are added as storage qualifiers.
In GLSL 4.20 (or ARB_shading_language_420pack), `centroid`, `sample`,
and `patch` are split from `in` and `out`, and made `auxiliary storage
qualifiers`.
On Wed, Feb 5, 2014 at 2:01 AM, Kevin Rogovin <kevin.rogovin at intel.com> wrote:
> Place centroid keyword as an interpolation qualifier.
> Previously was a storage qualifier. Fixes front end
> to accept input of the form "centroid in type variable"
>
> ---
> src/glsl/glsl_parser.yy | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index 928c57e..265fc57 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1353,6 +1353,11 @@ interpolation_qualifier:
> memset(& $$, 0, sizeof($$));
> $$.flags.q.flat = 1;
> }
> + | CENTROID
> + {
> + memset(& $$, 0, sizeof($$));
> + $$.flags.q.centroid = 1;
> + }
> | NOPERSPECTIVE
> {
> memset(& $$, 0, sizeof($$));
> @@ -1501,13 +1506,7 @@ type_qualifier:
> }
> ;
>
> -auxiliary_storage_qualifier:
> - CENTROID
> - {
> - memset(& $$, 0, sizeof($$));
> - $$.flags.q.centroid = 1;
> - }
> - | SAMPLE
> +auxiliary_storage_qualifier:SAMPLE
> {
> memset(& $$, 0, sizeof($$));
> $$.flags.q.sample = 1;
> --
> 1.8.1.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list