glsl: Optimize ~~x into x.
authorEric Anholt <eric@anholt.net>
Sat, 18 Jan 2014 18:36:28 +0000 (10:36 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 7 Feb 2014 20:46:47 +0000 (12:46 -0800)
commit2c2aa353366c610382273bea10656e6d6960ce3b
treefbdb2c7a47b6b5c7c441554977b9c0d407d9c129
parent0f6279bab29614e3764a333242680ead78068d91
glsl: Optimize ~~x into x.

v2: Fix pasteo of an extra abs being inserted (caught by many).  Rewrite
    to drop the silly switch statement.

Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
src/glsl/opt_algebraic.cpp