Re: [Mesa-dev] [PATCH] state_tracker: Fix bug in conditional discards with native ints.

2014-09-04 Thread Eric Anholt
Brian Paul writes: > On 09/03/2014 03:04 PM, Eric Anholt wrote: >> 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 >> n

Re: [Mesa-dev] [PATCH] state_tracker: Fix bug in conditional discards with native ints.

2014-09-04 Thread Brian Paul
On 09/03/2014 03:04 PM, Eric Anholt wrote: 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 flo

[Mesa-dev] [PATCH] state_tracker: Fix bug in conditional discards with native ints.

2014-09-03 Thread Eric Anholt
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. --- src/mesa/state_tracker/st_glsl_to_tgs