Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-30 Thread Ian Romanick
On 04/30/2014 03:21 AM, Petri Latvala wrote: > On 04/29/2014 09:57 PM, Matt Turner wrote: >> On Tue, Apr 29, 2014 at 6:01 AM, Petri Latvala >> wrote: >>> For the record, tested this with the following shader: >>> >>> >> Cool. Please submit this as a piglit test. > > Sent to piglit mailing list, w

Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-30 Thread Petri Latvala
On 04/29/2014 09:57 PM, Matt Turner wrote: On Tue, Apr 29, 2014 at 6:01 AM, Petri Latvala wrote: For the record, tested this with the following shader: Cool. Please submit this as a piglit test. Sent to piglit mailing list, with accompanying tests for min3 and max3. Wouldn't it be simpler

Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-29 Thread Matt Turner
On Tue, Apr 29, 2014 at 6:01 AM, Petri Latvala wrote: > If mid3 is called with two constants, the resulting IR was two maxes and three > mins, when one max and one min would have sufficed. Make mid3() produce an > ir_expression with ir_triop_mid3 (new ir_expression operation) and lower it in > a l

Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-29 Thread Ilia Mirkin
On Tue, Apr 29, 2014 at 9:15 AM, Petri Latvala wrote: > Just noticed that this obviously conflicts with Ilia Mirkin's patches for > lowering of carry/borrow. I'll rebase and resend once those land. I'm still waiting for a review on my 2/2, so whoever lands second will be doing the rebase. I don't

Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-29 Thread Petri Latvala
Just noticed that this obviously conflicts with Ilia Mirkin's patches for lowering of carry/borrow. I'll rebase and resend once those land. -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman

[Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-29 Thread Petri Latvala
If mid3 is called with two constants, the resulting IR was two maxes and three mins, when one max and one min would have sufficed. Make mid3() produce an ir_expression with ir_triop_mid3 (new ir_expression operation) and lower it in a lower_instructions pass to the needed amount of mins and maxs.