aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/opt_function_inlining.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-10 09:49:29 +0000
committermarha <marha@users.sourceforge.net>2011-03-10 09:49:29 +0000
commitf81bb3160c5f39d8f7ad329e99865af88f02b96a (patch)
treee12e90b1707bed3f4fdd6a3901f4cbcbe76d0b34 /mesalib/src/glsl/opt_function_inlining.cpp
parent8c74e7257ed453143c53086f884f6c6ff585379a (diff)
downloadvcxsrv-f81bb3160c5f39d8f7ad329e99865af88f02b96a.tar.gz
vcxsrv-f81bb3160c5f39d8f7ad329e99865af88f02b96a.tar.bz2
vcxsrv-f81bb3160c5f39d8f7ad329e99865af88f02b96a.zip
xserver mesa git update 10 Mar 2011
Diffstat (limited to 'mesalib/src/glsl/opt_function_inlining.cpp')
-rw-r--r--mesalib/src/glsl/opt_function_inlining.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/mesalib/src/glsl/opt_function_inlining.cpp b/mesalib/src/glsl/opt_function_inlining.cpp
index 2e7831dcb..8fef358cc 100644
--- a/mesalib/src/glsl/opt_function_inlining.cpp
+++ b/mesalib/src/glsl/opt_function_inlining.cpp
@@ -126,7 +126,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
parameters = new ir_variable *[num_parameters];
/* Generate storage for the return value. */
- if (this->callee->return_type) {
+ if (!this->callee->return_type->is_void()) {
retval = new(ctx) ir_variable(this->callee->return_type, "_ret_val",
ir_var_auto);
next_ir->insert_before(retval);
@@ -209,10 +209,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
}
/* Now push those new instructions in. */
- foreach_iter(exec_list_iterator, iter, new_instructions) {
- ir_instruction *ir = (ir_instruction *)iter.get();
- next_ir->insert_before(ir);
- }
+ next_ir->insert_before(&new_instructions);
/* Copy back the value of any 'out' parameters from the function body
* variables to our own.