mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 03:48:06 +02:00
glsl: Fix regression in function out-parameter lvalue detection.
When doing the var->assigned change in
f2475ca424, I overzealously indented the
second block of code into the "if (var)" test. Revert these blocks to
the way they were before, just taking advantage of "var" to avoid
re-calling variable_referenced().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49066
This commit is contained in:
parent
3362c7d9b6
commit
4595288ba8
1 changed files with 14 additions and 14 deletions
|
|
@ -153,21 +153,21 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
|
|||
}
|
||||
|
||||
ir_variable *var = actual->variable_referenced();
|
||||
if (var) {
|
||||
if (var->read_only) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"function parameter '%s %s' references the "
|
||||
"read-only variable '%s'",
|
||||
mode, formal->name,
|
||||
actual->variable_referenced()->name);
|
||||
return false;
|
||||
} else if (!actual->is_lvalue()) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"function parameter '%s %s' is not an lvalue",
|
||||
mode, formal->name);
|
||||
return false;
|
||||
}
|
||||
if (var)
|
||||
var->assigned = true;
|
||||
|
||||
if (var && var->read_only) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"function parameter '%s %s' references the "
|
||||
"read-only variable '%s'",
|
||||
mode, formal->name,
|
||||
actual->variable_referenced()->name);
|
||||
return false;
|
||||
} else if (!actual->is_lvalue()) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"function parameter '%s %s' is not an lvalue",
|
||||
mode, formal->name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue