Module: Mesa Branch: 10.1 Commit: 31462dc748b3c08cf7cad3df834388791a789248 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=31462dc748b3c08cf7cad3df834388791a789248
Author: Tapani Pälli <tapani.pa...@intel.com> Date: Wed Apr 30 10:56:59 2014 +0300 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.pa...@intel.com> Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com> Cc: "10.1 10.2" <mesa-sta...@lists.freedesktop.org> (cherry picked from commit e65917f94e5fd13eb75f874fac4d77a29737e808) --- 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 f939fe8..a9d4942 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1242,6 +1242,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 { @@ -1298,10 +1305,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 _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit