diff options
author | Tapani Pälli <tapani.palli@intel.com> | 2014-04-30 10:56:59 +0300 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-05-07 09:48:34 -0700 |
commit | c7a3c2d29d74a96ac8461ec06ca8b9e0b957a994 (patch) | |
tree | c2629062184122cf756291ab85b57b7b0456bfdb /src/glsl | |
parent | 0a5034517ac8c8951305fd88e94684d1c739901c (diff) |
glsl: fix bogus layout qualifier warnings
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@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit e65917f94e5fd13eb75f874fac4d77a29737e808)
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glsl_parser.yy | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index e3ee16a10c9..b09d6e536e3 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 |