Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-21 Thread Eric Anholt
Rob Clark writes: > Eric, > > we've managed to find the alpha-ref bitfield on a4xx, so suddenly I > don't actually need this anymore.. > > I've pushed a slightly updated version where I'd fixed a few more > things (and was passing the fbo-alphatest-formats tests for me) to my > github tree, in ca

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-20 Thread Rob Clark
Eric, we've managed to find the alpha-ref bitfield on a4xx, so suddenly I don't actually need this anymore.. I've pushed a slightly updated version where I'd fixed a few more things (and was passing the fbo-alphatest-formats tests for me) to my github tree, in case you feel motivated to take it o

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-20 Thread Roland Scheidegger
Am 20.12.2014 um 16:27 schrieb Roland Scheidegger: > Am 20.12.2014 um 02:02 schrieb Rob Clark: >> On Fri, Dec 19, 2014 at 5:35 PM, Roland Scheidegger >> wrote: >>> I'm not a fan of using semantics for consts (fwiw I think it would >>> probably be a good idea to use different namespaces for system

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-20 Thread Roland Scheidegger
Am 20.12.2014 um 02:02 schrieb Rob Clark: > On Fri, Dec 19, 2014 at 5:35 PM, Roland Scheidegger > wrote: >> I'm not a fan of using semantics for consts (fwiw I think it would >> probably be a good idea to use different namespaces for system values >> and inputs too but that's another topic). >> I

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Rob Clark
On Fri, Dec 19, 2014 at 5:35 PM, Roland Scheidegger wrote: > I'm not a fan of using semantics for consts (fwiw I think it would > probably be a good idea to use different namespaces for system values > and inputs too but that's another topic). > I don't quite share the concerns about possibly indi

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Roland Scheidegger
I'm not a fan of using semantics for consts (fwiw I think it would probably be a good idea to use different namespaces for system values and inputs too but that's another topic). I don't quite share the concerns about possibly indirectly addressing such a const though (because if const buffers are

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Rob Clark
On Fri, Dec 19, 2014 at 5:18 PM, Chris Forbes wrote: > On Sat, Dec 20, 2014 at 8:11 AM, Rob Clark wrote: >> @@ -1452,6 +1593,20 @@ tgsi_transform_lowering(const struct >> tgsi_lowering_config *config, >>} >> } >> >> + if ((info->processor == TGSI_PROCESSOR_FRAGMENT) && >> + c

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Chris Forbes
On Sat, Dec 20, 2014 at 8:11 AM, Rob Clark wrote: > @@ -1452,6 +1593,20 @@ tgsi_transform_lowering(const struct > tgsi_lowering_config *config, >} > } > > + if ((info->processor == TGSI_PROCESSOR_FRAGMENT) && > + config->lower_alpha_test && > + (config->alpha_func != PIP

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Rob Clark
On Fri, Dec 19, 2014 at 5:06 PM, Brian Paul wrote: > On 12/19/2014 02:47 PM, Rob Clark wrote: >> >> On Fri, Dec 19, 2014 at 4:26 PM, Ilia Mirkin wrote: >>> >>> On Fri, Dec 19, 2014 at 4:04 PM, Rob Clark wrote: On Fri, Dec 19, 2014 at 3:50 PM, Ilia Mirkin wrote: > > On Fri

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Ilia Mirkin
On Fri, Dec 19, 2014 at 4:47 PM, Rob Clark wrote: > On Fri, Dec 19, 2014 at 4:26 PM, Ilia Mirkin wrote: >> On Fri, Dec 19, 2014 at 4:04 PM, Rob Clark wrote: >>> On Fri, Dec 19, 2014 at 3:50 PM, Ilia Mirkin wrote: On Fri, Dec 19, 2014 at 2:11 PM, Rob Clark wrote: > From: Rob Clark >>>

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Brian Paul
On 12/19/2014 02:47 PM, Rob Clark wrote: On Fri, Dec 19, 2014 at 4:26 PM, Ilia Mirkin wrote: On Fri, Dec 19, 2014 at 4:04 PM, Rob Clark wrote: On Fri, Dec 19, 2014 at 3:50 PM, Ilia Mirkin wrote: On Fri, Dec 19, 2014 at 2:11 PM, Rob Clark wrote: From: Rob Clark This emulates alpha-test w

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Rob Clark
On Fri, Dec 19, 2014 at 4:26 PM, Ilia Mirkin wrote: > On Fri, Dec 19, 2014 at 4:04 PM, Rob Clark wrote: >> On Fri, Dec 19, 2014 at 3:50 PM, Ilia Mirkin wrote: >>> On Fri, Dec 19, 2014 at 2:11 PM, Rob Clark wrote: From: Rob Clark This emulates alpha-test with a compare + KILL_IF.

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Ilia Mirkin
On Fri, Dec 19, 2014 at 4:04 PM, Rob Clark wrote: > On Fri, Dec 19, 2014 at 3:50 PM, Ilia Mirkin wrote: >> On Fri, Dec 19, 2014 at 2:11 PM, Rob Clark wrote: >>> From: Rob Clark >>> >>> This emulates alpha-test with a compare + KILL_IF. The alpha-ref value >>> is passed to the shader via consta

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Rob Clark
On Fri, Dec 19, 2014 at 3:50 PM, Ilia Mirkin wrote: > On Fri, Dec 19, 2014 at 2:11 PM, Rob Clark wrote: >> From: Rob Clark >> >> This emulates alpha-test with a compare + KILL_IF. The alpha-ref value >> is passed to the shader via constant tagged with new ALPHAREF semantic. >> For example: >> >

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Ilia Mirkin
On Fri, Dec 19, 2014 at 2:11 PM, Rob Clark wrote: > From: Rob Clark > > This emulates alpha-test with a compare + KILL_IF. The alpha-ref value > is passed to the shader via constant tagged with new ALPHAREF semantic. > For example: > > FRAG > PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1 > DCL IN[

[Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-19 Thread Rob Clark
From: Rob Clark This emulates alpha-test with a compare + KILL_IF. The alpha-ref value is passed to the shader via constant tagged with new ALPHAREF semantic. For example: FRAG PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1 DCL IN[0], COLOR, COLOR DCL OUT[0], COLOR 0: MOV OUT[0], IN[0] 1