summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_function_inlining.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-03-07 15:08:22 -0800
committerIan Romanick <[email protected]>2011-03-08 11:47:25 -0800
commit2df56b002dcc5d7e91515bd0ca741677f0172b38 (patch)
treee3da76a4254f5d6398e851ab13fd93b82aa20571 /src/glsl/opt_function_inlining.cpp
parent719f07e45a4cd43d1edce196512b54f36ada53b1 (diff)
glsl: Function signatures cannot have NULL return type
The return type can be void, and this is the case where a `_ret_val' variable should not be declared.
Diffstat (limited to 'src/glsl/opt_function_inlining.cpp')
-rw-r--r--src/glsl/opt_function_inlining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_function_inlining.cpp b/src/glsl/opt_function_inlining.cpp
index 2e7831dcbdb..064089a9f77 100644
--- a/src/glsl/opt_function_inlining.cpp
+++ b/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);