[Mesa-dev] [PATCH] glsl: Flip around "if" statements with empty "then" blocks.

Kenneth Graunke kenneth at whitecape.org
Fri May 3 16:09:40 PDT 2013


On 05/03/2013 03:05 PM, Eric Anholt wrote:
> 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%)
> ---
>   src/glsl/opt_if_simplification.cpp | 27 ++++++++++++++++++++++++++-
>   1 file changed, 26 insertions(+), 1 deletion(-)

What a strange occurrance :)  Obvious improvement though.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>



More information about the mesa-dev mailing list