From: Nicolai Hähnle <[email protected]>
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;
--
2.7.4
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev