From: Eric Anholt Date: Tue, 13 Jul 2010 02:31:54 +0000 (-0700) Subject: glsl2: Flatten expressions that appear as the children of ir_return as well. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94da2abfd49c6b4060544986ef68d5662b1cc292;p=mesa.git glsl2: Flatten expressions that appear as the children of ir_return as well. --- 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; }