Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Rob Clark
On Tue, Mar 31, 2015 at 2:33 PM, Matt Turner wrote: > On Tue, Mar 31, 2015 at 11:30 AM, Rob Clark wrote: >> On Tue, Mar 31, 2015 at 2:20 PM, Matt Turner wrote: >>> Alternatively, Jason's implemented a pass to "resolve" booleans to >>> these values, which is necessary for us on i965 Gen4 and Gen5

Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Matt Turner
On Tue, Mar 31, 2015 at 11:30 AM, Rob Clark wrote: > On Tue, Mar 31, 2015 at 2:20 PM, Matt Turner wrote: >> Alternatively, Jason's implemented a pass to "resolve" booleans to >> these values, which is necessary for us on i965 Gen4 and Gen5. You >> could probably use that. > > ok, is that already

Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Rob Clark
On Tue, Mar 31, 2015 at 2:20 PM, Matt Turner wrote: > On Tue, Mar 31, 2015 at 11:11 AM, Rob Clark wrote: >> On Tue, Mar 31, 2015 at 2:03 PM, Kenneth Graunke >> wrote: >>> I'm pretty sure you want b2f here, not u2f...the slt/sge/seq/sne opcodes >>> are defined to return either 0.0 or 1.0. flt a

Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Matt Turner
On Tue, Mar 31, 2015 at 11:11 AM, Rob Clark wrote: > On Tue, Mar 31, 2015 at 2:03 PM, Kenneth Graunke > wrote: >> I'm pretty sure you want b2f here, not u2f...the slt/sge/seq/sne opcodes >> are defined to return either 0.0 or 1.0. flt and friends return 0 or >> 0x. u2f converts the num

Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Ilia Mirkin
On Tue, Mar 31, 2015 at 2:11 PM, Rob Clark wrote: > On Tue, Mar 31, 2015 at 2:03 PM, Kenneth Graunke > wrote: >> On Tuesday, March 31, 2015 11:30:17 AM Rob Clark wrote: >>> From: Rob Clark >>> >>> In freedreno these get implemented as the matching f* instruction plus a >>> u2f to convert the re

Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Rob Clark
On Tue, Mar 31, 2015 at 2:03 PM, Kenneth Graunke wrote: > On Tuesday, March 31, 2015 11:30:17 AM Rob Clark wrote: >> From: Rob Clark >> >> In freedreno these get implemented as the matching f* instruction plus a >> u2f to convert the result to float 1.0/0.0. But less lines of code to >> just let

Re: [Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Kenneth Graunke
On Tuesday, March 31, 2015 11:30:17 AM Rob Clark wrote: > From: Rob Clark > > In freedreno these get implemented as the matching f* instruction plus a > u2f to convert the result to float 1.0/0.0. But less lines of code to > just let nir_opt_algebraic handle this for us, plus opens up some small

[Mesa-dev] [PATCH] nir: add option to lower slt/sge/seq/sne

2015-03-31 Thread Rob Clark
From: Rob Clark In freedreno these get implemented as the matching f* instruction plus a u2f to convert the result to float 1.0/0.0. But less lines of code to just let nir_opt_algebraic handle this for us, plus opens up some small window for other opt passes to improve (ie. if some shader ended