aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast_function.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-09 15:52:33 +0200
committermarha <marha@users.sourceforge.net>2012-05-09 15:52:33 +0200
commit8a448108ec0bc3a0a488b2234e0d12aee503c67c (patch)
tree22e71069622608062b2f5eab3ef485438cd32122 /mesalib/src/glsl/ast_function.cpp
parent62068b3bc534d504e40df34847b4436f1a496f35 (diff)
downloadvcxsrv-8a448108ec0bc3a0a488b2234e0d12aee503c67c.tar.gz
vcxsrv-8a448108ec0bc3a0a488b2234e0d12aee503c67c.tar.bz2
vcxsrv-8a448108ec0bc3a0a488b2234e0d12aee503c67c.zip
libX11 mesa xserver xkeyboard-config
Diffstat (limited to 'mesalib/src/glsl/ast_function.cpp')
-rw-r--r--mesalib/src/glsl/ast_function.cpp30
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;
}