Re: [Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.

2014-03-01 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.

2014-03-01 Thread Kenneth Graunke
On 03/01/2014 09:33 AM, Ian Romanick wrote: > On 03/01/2014 12:18 AM, Kenneth Graunke wrote: >> opt_algebraic was translating lrp(x, 0, a) into add(x, -mul(x, a)). >> >> Unfortunately, this references "x" twice, which is invalid in the IR, >> leading to assertion failures in the validator. > > Rig

Re: [Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.

2014-03-01 Thread Ian Romanick
On 03/01/2014 12:18 AM, Kenneth Graunke wrote: opt_algebraic was translating lrp(x, 0, a) into add(x, -mul(x, a)). Unfortunately, this references "x" twice, which is invalid in the IR, leading to assertion failures in the validator. Right... and Matt probably didn't notice this because he test

[Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.

2014-03-01 Thread Kenneth Graunke
opt_algebraic was translating lrp(x, 0, a) into add(x, -mul(x, a)). Unfortunately, this references "x" twice, which is invalid in the IR, leading to assertion failures in the validator. Normally, cloning IR solves this. However, "x" could actually be an arbitrary expression tree, so copying it c