diff options
author | marha <marha@users.sourceforge.net> | 2012-04-20 17:07:15 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-04-20 17:07:15 +0200 |
commit | 0e3699334faf92f508b6c187a261548b656b0dd3 (patch) | |
tree | 28d7e84df7b54a3e6f85bf83e38efba937288fd3 /mesalib/src/glsl/ast_function.cpp | |
parent | c1194ccd395fdbb23c9ab56bc340ee20a5feeb82 (diff) | |
download | vcxsrv-0e3699334faf92f508b6c187a261548b656b0dd3.tar.gz vcxsrv-0e3699334faf92f508b6c187a261548b656b0dd3.tar.bz2 vcxsrv-0e3699334faf92f508b6c187a261548b656b0dd3.zip |
fontconfig libX11 mesa pixman xserver git update 20 april 2012
Diffstat (limited to 'mesalib/src/glsl/ast_function.cpp')
-rw-r--r-- | mesalib/src/glsl/ast_function.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/mesalib/src/glsl/ast_function.cpp b/mesalib/src/glsl/ast_function.cpp index 39401017b..8bf0ba2a8 100644 --- a/mesalib/src/glsl/ast_function.cpp +++ b/mesalib/src/glsl/ast_function.cpp @@ -152,19 +152,22 @@ verify_parameter_modes(_mesa_glsl_parse_state *state, return false; } - if (actual->variable_referenced() - && actual->variable_referenced()->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; + 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; + } + var->assigned = true; } } |