aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/opt_constant_variable.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 10:49:59 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 10:49:59 +0200
commitc6f80401dc533b04341afe8d596960d1bc25efce (patch)
tree2826007946218a8370d2eebc6aa32083618e2bfe /mesalib/src/glsl/opt_constant_variable.cpp
parent31706e67674f308e3e7f2a8aaf02f1e0a00fbade (diff)
downloadvcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.tar.gz
vcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.tar.bz2
vcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.zip
fontconfig mesa xkeyboard-config xserver pixman git update 10 Apr 2012
Diffstat (limited to 'mesalib/src/glsl/opt_constant_variable.cpp')
-rw-r--r--mesalib/src/glsl/opt_constant_variable.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/mesalib/src/glsl/opt_constant_variable.cpp b/mesalib/src/glsl/opt_constant_variable.cpp
index 3fa7c3bad..f3bc8675e 100644
--- a/mesalib/src/glsl/opt_constant_variable.cpp
+++ b/mesalib/src/glsl/opt_constant_variable.cpp
@@ -127,7 +127,8 @@ ir_constant_variable_visitor::visit_enter(ir_assignment *ir)
ir_visitor_status
ir_constant_variable_visitor::visit_enter(ir_call *ir)
{
- exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
+ /* Mark any out parameters as assigned to */
+ exec_list_iterator sig_iter = ir->callee->parameters.iterator();
foreach_iter(exec_list_iterator, iter, *ir) {
ir_rvalue *param_rval = (ir_rvalue *)iter.get();
ir_variable *param = (ir_variable *)sig_iter.get();
@@ -143,6 +144,17 @@ ir_constant_variable_visitor::visit_enter(ir_call *ir)
}
sig_iter.next();
}
+
+ /* Mark the return storage as having been assigned to */
+ if (ir->return_deref != NULL) {
+ ir_variable *var = ir->return_deref->variable_referenced();
+ struct assignment_entry *entry;
+
+ assert(var);
+ entry = get_assignment_entry(var, &this->list);
+ entry->assignment_count++;
+ }
+
return visit_continue;
}