summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r--src/mesa/main/framebuffer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 361ed668587..9c7f0c9451f 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -1016,3 +1016,16 @@ _mesa_is_alpha_test_enabled(const struct gl_context *ctx)
bool buffer0_is_integer = ctx->DrawBuffer->_IntegerBuffers & 0x1;
return (ctx->Color.AlphaEnabled && !buffer0_is_integer);
}
+
+/**
+ * Is alpha to coverage enabled and applicable to the currently bound
+ * framebuffer?
+ */
+bool
+_mesa_is_alpha_to_coverage_enabled(const struct gl_context *ctx)
+{
+ bool buffer0_is_integer = ctx->DrawBuffer->_IntegerBuffers & 0x1;
+ return (ctx->Multisample.SampleAlphaToCoverage &&
+ _mesa_is_multisample_enabled(ctx) &&
+ !buffer0_is_integer);
+}