mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
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 e65917f94e)
This commit is contained in:
parent
994203bf5e
commit
31462dc748
1 changed files with 7 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue