glsl2: Add a pass to simplify if statements returning from both sides.
authorEric Anholt <eric@anholt.net>
Wed, 7 Jul 2010 01:09:39 +0000 (18:09 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 7 Jul 2010 16:10:48 +0000 (09:10 -0700)
commitd674ebcee0d2731e50d6530502cefcebc39dcdb6
tree74feecda4fdc277c972e01267289a66cd45415f6
parent6de882334ac7f3d32d04261adfed1397e075ffd5
glsl2: Add a pass to simplify if statements returning from both sides.

This allows function inlining making the following tests work even
without function calls implemented:
glsl-fs-functions-2
glsl-fs-functions-3
glsl-vs-functions
glsl-vs-functions-2
glsl-vs-functions-3
glsl-vs-vec4-indexing-5

(Note that those tests were designed to trigger actual function calls,
and this defeats them.  However, those testcases ended up catching the
bug in the previous commit.)
src/glsl/Makefile
src/glsl/ir_if_return.cpp [new file with mode: 0644]
src/glsl/ir_optimization.h
src/mesa/shader/ir_to_mesa.cpp