Re: [Mesa-dev] [PATCH] gallium/docs: document alpha_to_coverage and alpha_to_one blend state

2016-09-16 Thread Marek Olšák
On Thu, Sep 15, 2016 at 11:35 PM, Ilia Mirkin  wrote:
> What about integer RTs? I had to add a hack in nouveau to make it
> disable those when RT0 is an integer. It'd be more convenient if they
> were turned off in the first place.

Deriving one hw state from 2 states isn't hacking. That's normal.

I'm generally not in favor of adding more dependencies to st/mesa
states, because it would increase the amount of state processing for
everybody.

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallium/docs: document alpha_to_coverage and alpha_to_one blend state

2016-09-15 Thread Roland Scheidegger
A good question. I have no idea what d3d10 does there (since a
conversion from alpha to coverage doesn't really make sense as the alpha
values don't actually go from 0 to 1).
I suppose they could be translated away in the state tracker as well
since the combination doesn't make sense (albeit we don't do that for
d3d10 - maybe this behavior isn't tested).

But in any case, this documentation is an improvement.
(alpha_to_one is not possible with d3d10, therefore the semantics could
be different, but it probably makes sense it follows the same rules.)
Reviewed-by: Roland Scheidegger 


Am 15.09.2016 um 23:35 schrieb Ilia Mirkin:
> What about integer RTs? I had to add a hack in nouveau to make it
> disable those when RT0 is an integer. It'd be more convenient if they
> were turned off in the first place.
> 
> On Thu, Sep 15, 2016 at 5:34 PM, Brian Paul  wrote:
>> The gallium interface defines these like DX10.  Note that OpenGL ignores
>> these options if MSAA is disabled or the dest buffer doesn't support
>> MSAA.
>> ---
>>  src/gallium/docs/source/cso/blend.rst | 12 
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/src/gallium/docs/source/cso/blend.rst 
>> b/src/gallium/docs/source/cso/blend.rst
>> index dce999c..7316e5c 100644
>> --- a/src/gallium/docs/source/cso/blend.rst
>> +++ b/src/gallium/docs/source/cso/blend.rst
>> @@ -88,6 +88,18 @@ independent_blend_enable
>> the first member of the rt array contains valid data.
>>  rt
>> Contains the per-rendertarget blend state.
>> +alpha_to_coverage
>> +   If enabled, the fragment's alpha value is used to override the fragment's
>> +   coverage mask.  The coverage mask will be all zeros if the alpha value is
>> +   zero.  The coverage mask will be all ones if the alpha value is one.
>> +   Otherwise, the number of bits set in the coverage mask will be 
>> proportional
>> +   to the alpha value.  Note that this step happens regardless of whether
>> +   multisample is enabled or the destination buffer is multisampled.
>> +alpha_to_one
>> +   If enabled, the fragment's alpha value will be set to one.  As with
>> +   alpha_to_coverage, this step happens regardless of whether multisample
>> +   is enabled or the destination buffer is multisampled.
>> +
>>
>>  Per-rendertarget Members
>>  
>> --

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallium/docs: document alpha_to_coverage and alpha_to_one blend state

2016-09-15 Thread Ilia Mirkin
What about integer RTs? I had to add a hack in nouveau to make it
disable those when RT0 is an integer. It'd be more convenient if they
were turned off in the first place.

On Thu, Sep 15, 2016 at 5:34 PM, Brian Paul  wrote:
> The gallium interface defines these like DX10.  Note that OpenGL ignores
> these options if MSAA is disabled or the dest buffer doesn't support
> MSAA.
> ---
>  src/gallium/docs/source/cso/blend.rst | 12 
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/gallium/docs/source/cso/blend.rst 
> b/src/gallium/docs/source/cso/blend.rst
> index dce999c..7316e5c 100644
> --- a/src/gallium/docs/source/cso/blend.rst
> +++ b/src/gallium/docs/source/cso/blend.rst
> @@ -88,6 +88,18 @@ independent_blend_enable
> the first member of the rt array contains valid data.
>  rt
> Contains the per-rendertarget blend state.
> +alpha_to_coverage
> +   If enabled, the fragment's alpha value is used to override the fragment's
> +   coverage mask.  The coverage mask will be all zeros if the alpha value is
> +   zero.  The coverage mask will be all ones if the alpha value is one.
> +   Otherwise, the number of bits set in the coverage mask will be 
> proportional
> +   to the alpha value.  Note that this step happens regardless of whether
> +   multisample is enabled or the destination buffer is multisampled.
> +alpha_to_one
> +   If enabled, the fragment's alpha value will be set to one.  As with
> +   alpha_to_coverage, this step happens regardless of whether multisample
> +   is enabled or the destination buffer is multisampled.
> +
>
>  Per-rendertarget Members
>  
> --
> 1.9.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev