From 35220fc5981045331b4f048f0fc2e1371a0673ed Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 17 Aug 2010 19:41:27 -0700 Subject: 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 --- src/mesa/program/ir_to_mesa.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/program') 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; -- cgit v1.2.3