mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
Enabling alphaToCoverage
Added the alphaToCoverage functionality with some end2end tests. There is no validation for disabling alphaToCoverage mode if SV_Coverage is statically used by the shader yet. Bug: dawn:494 Change-Id: I9df15b35697ea05a064b092edae9d5d20f73c4d8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25761 Commit-Queue: Tomek Ponitka <tommek@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
9ecb99344f
commit
ab04da48f4
@@ -258,6 +258,11 @@ namespace dawn_native { namespace opengl {
|
||||
ApplyDepthStencilState(gl, GetDepthStencilStateDescriptor(), &persistentPipelineState);
|
||||
|
||||
gl.SampleMaski(0, GetSampleMask());
|
||||
if (IsAlphaToCoverageEnabled()) {
|
||||
gl.Enable(GL_SAMPLE_ALPHA_TO_COVERAGE);
|
||||
} else {
|
||||
gl.Disable(GL_SAMPLE_ALPHA_TO_COVERAGE);
|
||||
}
|
||||
|
||||
for (uint32_t attachmentSlot : IterateBitSet(GetColorAttachmentsMask())) {
|
||||
ApplyColorState(gl, attachmentSlot, GetColorStateDescriptor(attachmentSlot));
|
||||
|
||||
Reference in New Issue
Block a user