[Mesa-dev] [PATCH] glsl: fix bogus layout qualifier warnings
Anuj Phogat
anuj.phogat at gmail.com
Mon May 5 10:22:10 PDT 2014
On Sun, May 4, 2014 at 10:09 PM, Tapani Pälli <tapani.palli at intel.com> wrote:
> Print out GL_ARB_explicit_attrib_location warnings only
> when parsing attribute that uses "location" qualifier.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77245
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
May be tag for the stable branches.
> ---
> src/glsl/glsl_parser.yy | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index e3ee16a..b09d6e5 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1319,6 +1319,13 @@ layout_qualifier_id:
> if (match_layout_qualifier("location", $1, state) == 0) {
> $$.flags.q.explicit_location = 1;
>
> + if ($$.flags.q.attribute == 1 &&
> + state->ARB_explicit_attrib_location_warn) {
> + _mesa_glsl_warning(& @1, state,
> + "GL_ARB_explicit_attrib_location layout "
> + "identifier `%s' used", $1);
> + }
> +
> if ($3 >= 0) {
> $$.location = $3;
> } else {
> @@ -1426,10 +1433,6 @@ layout_qualifier_id:
> _mesa_glsl_error(& @1, state, "unrecognized layout identifier "
> "`%s'", $1);
> YYERROR;
> - } else if (state->ARB_explicit_attrib_location_warn) {
> - _mesa_glsl_warning(& @1, state,
> - "GL_ARB_explicit_attrib_location layout "
> - "identifier `%s' used", $1);
> }
> }
> | interface_block_layout_qualifier
> --
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
> 1.8.3.1
>
> _______________________________________________
> 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