state_tracker: Fix bug in conditional discards with native ints.
authorEric Anholt <eric@anholt.net>
Wed, 3 Sep 2014 18:57:47 +0000 (11:57 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 4 Sep 2014 18:39:50 +0000 (11:39 -0700)
commit511d2f9a133f95e0ab01de2aa05acdb23fb588d4
treed0fc3a8187693963416a686bef2372d4eee4539e
parente69b4abc43d8b5ef72716eb6409e76e98f0df28f
state_tracker: Fix bug in conditional discards with native ints.

A bool is 0 or ~0, and KILL_IF takes a float arg that's <0 for discard or
>= 0 for not.  By negating it, we ended up doing a floating point subtract
of (0 - ~0), which ended up as an inf.  To make this actually work, we
need to convert the bool to a float.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp