From: Eric Anholt Date: Wed, 18 Aug 2010 02:41:27 +0000 (-0700) Subject: ir_to_mesa: Allow ir_return in main(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35220fc5981045331b4f048f0fc2e1371a0673ed;p=mesa.git ir_to_mesa: Allow ir_return in main(). I didn't expect that this would really work, but it turns out there are shaders in the wild that do it. Fixes: (with swrast) glsl-fs-main-return glsl-vs-main-return --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 7b65fa4203b..7de1939b63f 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2129,12 +2129,12 @@ ir_to_mesa_visitor::visit(ir_texture *ir) void ir_to_mesa_visitor::visit(ir_return *ir) { - assert(current_function); - if (ir->get_value()) { ir_to_mesa_dst_reg l; int i; + assert(current_function); + ir->get_value()->accept(this); ir_to_mesa_src_reg r = this->result;