Re: [Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

2014-02-25 Thread Eric Anholt
Kenneth Graunke writes: > On 02/25/2014 09:38 AM, Eric Anholt wrote: >> Matt Turner writes: >> >>> On Mon, Feb 24, 2014 at 10:15 AM, Eric Anholt wrote: I think we would do better by emitting ADD(y_minus_x, y, negate(x)) MAC(dst, x, y_minus_x, a) >>> >>> MAC only takes two argume

Re: [Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

2014-02-25 Thread Kenneth Graunke
On 02/25/2014 09:38 AM, Eric Anholt wrote: > Matt Turner writes: > >> On Mon, Feb 24, 2014 at 10:15 AM, Eric Anholt wrote: >>> I think we would do better by emitting >>> ADD(y_minus_x, y, negate(x)) >>> MAC(dst, x, y_minus_x, a) >> >> MAC only takes two arguments, so >> - if you meant MAD, ther

Re: [Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

2014-02-25 Thread Eric Anholt
Matt Turner writes: > On Mon, Feb 24, 2014 at 10:15 AM, Eric Anholt wrote: >> I think we would do better by emitting >> ADD(y_minus_x, y, negate(x)) >> MAC(dst, x, y_minus_x, a) > > MAC only takes two arguments, so > - if you meant MAD, there's no MAD on platforms that don't have LRP > - if yo

Re: [Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

2014-02-24 Thread Matt Turner
On Mon, Feb 24, 2014 at 10:15 AM, Eric Anholt wrote: > I think we would do better by emitting > ADD(y_minus_x, y, negate(x)) > MAC(dst, x, y_minus_x, a) MAC only takes two arguments, so - if you meant MAD, there's no MAD on platforms that don't have LRP - if you meant MAC(dst, ...) I don't see

Re: [Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

2014-02-24 Thread Eric Anholt
Kenneth Graunke writes: > When the vec4 backend encountered an ir_triop_lrp, it always emitted an > actual LRP instruction, which only exists on Gen6+. Gen4-5 used > lower_instructions() to decompose ir_triop_lrp at the IR level. > > Since commit 8d37e9915a3b21 ("glsl: Optimize open-coded lrp in

[Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

2014-02-23 Thread Kenneth Graunke
When the vec4 backend encountered an ir_triop_lrp, it always emitted an actual LRP instruction, which only exists on Gen6+. Gen4-5 used lower_instructions() to decompose ir_triop_lrp at the IR level. Since commit 8d37e9915a3b21 ("glsl: Optimize open-coded lrp into lrp."), we've had an bug where l