[Mesa-dev] [PATCH 1/4] mesa/main: consider multisampling enabled when number of samples == 1

Edward O'Callaghan funfunctor at folklore1984.net
Wed Nov 16 10:20:43 UTC 2016


This series is,
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 11/16/2016 08:42 PM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> There are some differences between how non-multisampled framebuffers (i.e.
> samples == 0) and multisampled framebuffers with a single sample should be
> treated.  For example, alpha to coverage and writing to gl_SampleMask has an
> effect with single-sample multisample framebuffers, but not on
> non-multisample framebuffers.
> 
> This fixes GL45-CTS.sample_variables.mask.*.samples_1.* at least for
> Gallium drivers (and possibly others, though at least radeonsi needs an
> additional fix).
> ---
>  src/mesa/main/framebuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
> index 9c7f0c9..20d03fe 100644
> --- a/src/mesa/main/framebuffer.c
> +++ b/src/mesa/main/framebuffer.c
> @@ -996,21 +996,21 @@ _mesa_geometric_nonvalidated_samples(const struct gl_framebuffer *buffer)
>  
>  bool
>  _mesa_is_multisample_enabled(const struct gl_context *ctx)
>  {
>     /* The sample count may not be validated by the driver, but when it is set,
>      * we know that is in a valid range and no driver should ever validate a
>      * multisampled framebuffer to non-multisampled and vice-versa.
>      */
>     return ctx->Multisample.Enabled &&
>            ctx->DrawBuffer &&
> -          _mesa_geometric_nonvalidated_samples(ctx->DrawBuffer) > 1;
> +          _mesa_geometric_nonvalidated_samples(ctx->DrawBuffer) >= 1;
>  }
>  
>  /**
>   * Is alpha testing enabled and applicable to the currently bound
>   * framebuffer?
>   */
>  bool
>  _mesa_is_alpha_test_enabled(const struct gl_context *ctx)
>  {
>     bool buffer0_is_integer = ctx->DrawBuffer->_IntegerBuffers & 0x1;
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161116/0d8d7a64/attachment.sig>


More information about the mesa-dev mailing list