Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-27 Thread Kenneth Graunke
On Monday, August 27, 2018 6:18:21 PM PDT Marek Olšák wrote: > On Mon, Aug 27, 2018 at 5:55 PM, Kenneth Graunke > wrote: > > On Monday, August 27, 2018 11:05:19 AM PDT Marek Olšák wrote: > >> Yeah, this will be more complicated because it's per RT. > >> > >> I suggest adding a PIPE_CAP for the

Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-27 Thread Marek Olšák
On Mon, Aug 27, 2018 at 5:55 PM, Kenneth Graunke wrote: > On Monday, August 27, 2018 11:05:19 AM PDT Marek Olšák wrote: >> Yeah, this will be more complicated because it's per RT. >> >> I suggest adding a PIPE_CAP for the hw capability to force DST_ALPHA >> to 0, and applying this workaround only

Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-27 Thread Kenneth Graunke
On Monday, August 27, 2018 11:05:19 AM PDT Marek Olšák wrote: > Yeah, this will be more complicated because it's per RT. > > I suggest adding a PIPE_CAP for the hw capability to force DST_ALPHA > to 0, and applying this workaround only if the PIPE_CAP is 0. > > Marek I was thinking of applying

Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-27 Thread Marek Olšák
Yeah, this will be more complicated because it's per RT. I suggest adding a PIPE_CAP for the hw capability to force DST_ALPHA to 0, and applying this workaround only if the PIPE_CAP is 0. Marek On Sat, Aug 25, 2018 at 10:46 AM, Ilia Mirkin wrote: > You have to make sure to flip

Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-25 Thread Ilia Mirkin
You have to make sure to flip blend->independent_blend_enable to 1 in that case, and that will only work on some (well, most, but not all) hardware. Pre-something Tesla-era and I assume r600-era gpu's must have all rt's configured the same way. I'm also not 100% sure that it's OK to access the

[Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-25 Thread Kenneth Graunke
When faking an RGB format with an RGBA format, there may be a channel of data containing garbage. st/mesa already overrides texture swizzles to replace the A channel with ONE. This patch makes it override blend factors to achieve a similar effect. It appears that st_update_blend is already