i965: Fix the new implementation of ir_unop_sign to match brw_wm_emit.c
authorEric Anholt <eric@anholt.net>
Sun, 29 Aug 2010 05:42:01 +0000 (22:42 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 30 Aug 2010 17:26:05 +0000 (10:26 -0700)
commit4ff25c2106fb981334bdc1b032fcf37d8753ba62
tree3025610eb9070dee7ba383aa2df4a23279fb8f54
parent40aadafa91ef5b931436d400fedafd720d59deff
i965: Fix the new implementation of ir_unop_sign to match brw_wm_emit.c

Like the comparison operations, this suffered from CMP only setting
the low bit.  Doing the AND instructions would be the same instruction
count as the more obvious conditional moves, so do cond moves.

Fixes glsl-fs-sign and 6 other cases, like trig functions that use
sign() internally.
src/mesa/drivers/dri/i965/brw_fs.cpp