Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-02-25 Thread Ian Romanick
On 01/08/2015 10:59 PM, Matt Turner wrote: > + if ((then_rhs->is_one() || then_rhs->is_negative_one()) && > + (else_rhs->is_one() || else_rhs->is_negative_one())) { > + assert(then_rhs->is_one() == else_rhs->is_negative_one()); > + assert(else_rhs->is_one() == then_rhs->is_negativ

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-15 Thread Matt Turner
On Thu, Jan 8, 2015 at 10:59 PM, Matt Turner wrote: > total instructions in shared programs: 5886767 -> 5881642 (-0.09%) > instructions in affected programs: 532199 -> 527074 (-0.96%) > GAINED:9 > LOST: 6 > --- On top of Ian's i

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-14 Thread Ian Romanick
On 01/15/2015 10:29 AM, Matt Turner wrote: > On Wed, Jan 14, 2015 at 1:05 PM, Ian Romanick wrote: >> On 01/09/2015 07:59 PM, Matt Turner wrote: >>> total instructions in shared programs: 5886767 -> 5881642 (-0.09%) >>> instructions in affected programs: 532199 -> 527074 (-0.96%) >>> GAINED:

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-14 Thread Matt Turner
On Wed, Jan 14, 2015 at 1:52 PM, Matt Turner wrote: > On Wed, Jan 14, 2015 at 1:29 PM, Matt Turner wrote: >> glsl: Optimize certain if-statements to just casts from the condition > > Cherry-picked to master, the shader-db results are > > total instructions in shared programs: 5965630 -> 5952789 (

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-14 Thread Matt Turner
On Wed, Jan 14, 2015 at 1:29 PM, Matt Turner wrote: > glsl: Optimize certain if-statements to just casts from the condition Cherry-picked to master, the shader-db results are total instructions in shared programs: 5965630 -> 5952789 (-0.22%) instructions in affected programs: 737228 -> 72438

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-14 Thread Matt Turner
On Wed, Jan 14, 2015 at 1:05 PM, Ian Romanick wrote: > On 01/09/2015 07:59 PM, Matt Turner wrote: >> total instructions in shared programs: 5886767 -> 5881642 (-0.09%) >> instructions in affected programs: 532199 -> 527074 (-0.96%) >> GAINED:9 >> LOST:

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-14 Thread Ian Romanick
On 01/09/2015 07:59 PM, Matt Turner wrote: > total instructions in shared programs: 5886767 -> 5881642 (-0.09%) > instructions in affected programs: 532199 -> 527074 (-0.96%) > GAINED:9 > LOST: 6 I'll did out the rest of the data

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-13 Thread Matt Turner
On Thu, Jan 8, 2015 at 10:59 PM, Matt Turner wrote: > total instructions in shared programs: 5886767 -> 5881642 (-0.09%) > instructions in affected programs: 532199 -> 527074 (-0.96%) > GAINED:9 > LOST: 6 > --- And on Ironlake,

[Mesa-dev] [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-01-08 Thread Matt Turner
total instructions in shared programs: 5886767 -> 5881642 (-0.09%) instructions in affected programs: 532199 -> 527074 (-0.96%) GAINED:9 LOST: 6 --- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/b