From 94da2abfd49c6b4060544986ef68d5662b1cc292 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Jul 2010 19:31:54 -0700 Subject: [PATCH] glsl2: Flatten expressions that appear as the children of ir_return as well. --- src/glsl/ir_expression_flattening.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/glsl/ir_expression_flattening.cpp b/src/glsl/ir_expression_flattening.cpp index 629194c1a04..66268a679d9 100644 --- a/src/glsl/ir_expression_flattening.cpp +++ b/src/glsl/ir_expression_flattening.cpp @@ -176,9 +176,7 @@ ir_expression_flattening_visitor::visit_enter(ir_call *ir) ir_visitor_status ir_expression_flattening_visitor::visit_enter(ir_return *ir) { - /* FINISHME: Why not process the return value? (Same behavior as original - * FINISHME: code.) - */ - (void) ir; - return visit_continue_with_parent; + if (ir->value) + ir->value = operand_to_temp(ir->value); + return visit_continue; } -- 2.30.2