mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 02:50:16 +01:00
mesa: Add helper function _mesa_is_alpha_to_coverage_enabled()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
parent
0295c792b4
commit
a1bd2f6950
2 changed files with 16 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,4 +152,7 @@ _mesa_is_multisample_enabled(const struct gl_context *ctx);
|
|||
extern bool
|
||||
_mesa_is_alpha_test_enabled(const struct gl_context *ctx);
|
||||
|
||||
extern bool
|
||||
_mesa_is_alpha_to_coverage_enabled(const struct gl_context *ctx);
|
||||
|
||||
#endif /* FRAMEBUFFER_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue