glsl: Flip around "if" statements with empty "then" blocks.
authorEric Anholt <eric@anholt.net>
Fri, 3 May 2013 20:17:56 +0000 (13:17 -0700)
committerEric Anholt <eric@anholt.net>
Sun, 5 May 2013 20:20:42 +0000 (13:20 -0700)
commit739b88330c26457834c5e7e1b2e16cc3655d3fac
treeca81d4c3f812bcbfd5ad11f5e0be91bafb14623c
parent008346273c2cbc386f52efacac3d3228e566e8ac
glsl: Flip around "if" statements with empty "then" blocks.

This cleans up some funny-looking code in some unigine shaders I was
looking at.  Also slightly helps on planeshift and a few shaders in an
upcoming Valve release.

total instructions in shared programs: 1653715 -> 1653587 (-0.01%)
instructions in affected programs:     16550 -> 16422 (-0.77%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/opt_if_simplification.cpp