Mesa (master): mesa/main: consider multisampling enabled when number of samples == 1

Nicolai Hähnle nh at kemper.freedesktop.org
Fri Nov 18 08:55:04 UTC 2016


Module: Mesa
Branch: master
Commit: adba706122ee033a4f8023bd309b73b0a5c52105
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=adba706122ee033a4f8023bd309b73b0a5c52105

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Tue Nov 15 14:37:05 2016 +0100

mesa/main: consider multisampling enabled when number of samples == 1

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).

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

---

 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
@@ -1003,7 +1003,7 @@ _mesa_is_multisample_enabled(const struct gl_context *ctx)
     */
    return ctx->Multisample.Enabled &&
           ctx->DrawBuffer &&
-          _mesa_geometric_nonvalidated_samples(ctx->DrawBuffer) > 1;
+          _mesa_geometric_nonvalidated_samples(ctx->DrawBuffer) >= 1;
 }
 
 /**




More information about the mesa-commit mailing list