Re: [Mesa-dev] [PATCH] gallium/docs: document behavior of set_sample_mask()

2017-12-13 Thread Marek Olšák
On Wed, Dec 13, 2017 at 4:43 AM, Roland Scheidegger  wrote:
> Am 13.12.2017 um 04:34 schrieb Brian Paul:
>> The sample mask is used even if msaa is not explicity enabled when we
>> have a framebuffer with multisampled surfaces.  That's DX behavior and
>> what the Radeon drivers do.  Not sure about other drivers at this point.
>> ---
>>  src/gallium/docs/source/context.rst | 5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/docs/source/context.rst 
>> b/src/gallium/docs/source/context.rst
>> index 9d069b3..0ac7340 100644
>> --- a/src/gallium/docs/source/context.rst
>> +++ b/src/gallium/docs/source/context.rst
>> @@ -64,7 +64,10 @@ objects. They all follow simple, one-method binding 
>> calls, e.g.
>>  * ``set_stencil_ref`` sets the stencil front and back reference values
>>which are used as comparison values in stencil test.
>>  * ``set_blend_color``
>> -* ``set_sample_mask``
>> +* ``set_sample_mask``  sets the per-context multisample sample mask.  Note
>> +  that this takes effect even if multisampling is not explicitly enabled if
>> +  the frambuffer surface(s) are multisampled.  Also, this mask is AND-ed
>> +  with the optional fragment shader sample mask output (when emitted).
>>  * ``set_min_samples`` sets the minimum number of samples that must be run.
>>  * ``set_clip_state``
>>  * ``set_polygon_stipple``
>>
>
> Looks alright to me. Though note llvmpipe does this even for
> non-multisampled surfaces (as per dx behavior too). But as far as I
> know, radeons don't and it would have to be emulated (I suppose the dx10
> drivers do), so probably can't really make this gallium behavior (sample
> mask is pretty awkward with just one sample in the first place, and I
> doubt used in practice).

Old (and maybe even new) Radeons do obey the sample mask even with 1
sample. Sample mask == 0 kills all pixels.

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 behavior of set_sample_mask()

2017-12-12 Thread Roland Scheidegger
Am 13.12.2017 um 04:34 schrieb Brian Paul:
> The sample mask is used even if msaa is not explicity enabled when we
> have a framebuffer with multisampled surfaces.  That's DX behavior and
> what the Radeon drivers do.  Not sure about other drivers at this point.
> ---
>  src/gallium/docs/source/context.rst | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/docs/source/context.rst 
> b/src/gallium/docs/source/context.rst
> index 9d069b3..0ac7340 100644
> --- a/src/gallium/docs/source/context.rst
> +++ b/src/gallium/docs/source/context.rst
> @@ -64,7 +64,10 @@ objects. They all follow simple, one-method binding calls, 
> e.g.
>  * ``set_stencil_ref`` sets the stencil front and back reference values
>which are used as comparison values in stencil test.
>  * ``set_blend_color``
> -* ``set_sample_mask``
> +* ``set_sample_mask``  sets the per-context multisample sample mask.  Note
> +  that this takes effect even if multisampling is not explicitly enabled if
> +  the frambuffer surface(s) are multisampled.  Also, this mask is AND-ed
> +  with the optional fragment shader sample mask output (when emitted).
>  * ``set_min_samples`` sets the minimum number of samples that must be run.
>  * ``set_clip_state``
>  * ``set_polygon_stipple``
> 

Looks alright to me. Though note llvmpipe does this even for
non-multisampled surfaces (as per dx behavior too). But as far as I
know, radeons don't and it would have to be emulated (I suppose the dx10
drivers do), so probably can't really make this gallium behavior (sample
mask is pretty awkward with just one sample in the first place, and I
doubt used in practice).

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


[Mesa-dev] [PATCH] gallium/docs: document behavior of set_sample_mask()

2017-12-12 Thread Brian Paul
The sample mask is used even if msaa is not explicity enabled when we
have a framebuffer with multisampled surfaces.  That's DX behavior and
what the Radeon drivers do.  Not sure about other drivers at this point.
---
 src/gallium/docs/source/context.rst | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/docs/source/context.rst 
b/src/gallium/docs/source/context.rst
index 9d069b3..0ac7340 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -64,7 +64,10 @@ objects. They all follow simple, one-method binding calls, 
e.g.
 * ``set_stencil_ref`` sets the stencil front and back reference values
   which are used as comparison values in stencil test.
 * ``set_blend_color``
-* ``set_sample_mask``
+* ``set_sample_mask``  sets the per-context multisample sample mask.  Note
+  that this takes effect even if multisampling is not explicitly enabled if
+  the frambuffer surface(s) are multisampled.  Also, this mask is AND-ed
+  with the optional fragment shader sample mask output (when emitted).
 * ``set_min_samples`` sets the minimum number of samples that must be run.
 * ``set_clip_state``
 * ``set_polygon_stipple``
-- 
1.9.1

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