Re: [Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Francisco Jerez
Matt Turner writes: > On Fri, Jul 10, 2015 at 10:06 AM, Francisco Jerez > wrote: >> Booleans are represented as 0/-1 on modern hardware which means we can >> just negate them to convert them into a numeric type. Negation has >> the benefit that it can be implemented using a source modifier whi

Re: [Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 10:06 AM, Francisco Jerez wrote: > Booleans are represented as 0/-1 on modern hardware which means we can > just negate them to convert them into a numeric type. Negation has > the benefit that it can be implemented using a source modifier which > can easily be propagated

[Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Francisco Jerez
Booleans are represented as 0/-1 on modern hardware which means we can just negate them to convert them into a numeric type. Negation has the benefit that it can be implemented using a source modifier which can easily be propagated into some other instruction. shader-db results on HSW: total in