diff options
author | marha <marha@users.sourceforge.net> | 2012-05-09 16:07:11 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-09 16:07:11 +0200 |
commit | 58780b4306bd1254c6c0e65d255630d5c546005f (patch) | |
tree | 71c3b3842ee282b0228246840f5006c369684ab7 /mesalib/src/glsl/ast_function.cpp | |
parent | 38e785557684536d03fff096d56d5db61cc42e8a (diff) | |
parent | 8a448108ec0bc3a0a488b2234e0d12aee503c67c (diff) | |
download | vcxsrv-58780b4306bd1254c6c0e65d255630d5c546005f.tar.gz vcxsrv-58780b4306bd1254c6c0e65d255630d5c546005f.tar.bz2 vcxsrv-58780b4306bd1254c6c0e65d255630d5c546005f.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/ast_function.cpp')
-rw-r--r-- | mesalib/src/glsl/ast_function.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/mesalib/src/glsl/ast_function.cpp b/mesalib/src/glsl/ast_function.cpp index 8bf0ba2a8..9e7c5995f 100644 --- a/mesalib/src/glsl/ast_function.cpp +++ b/mesalib/src/glsl/ast_function.cpp @@ -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; } } @@ -278,7 +278,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig, * Function calls were first allowed to be constant expressions in GLSL 1.20. */ if (state->language_version >= 120) { - ir_constant *value = sig->constant_expression_value(actual_parameters); + ir_constant *value = sig->constant_expression_value(actual_parameters, NULL); if (value != NULL) { return value; } |