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>
diff --git a/src/dawn_native/opengl/RenderPipelineGL.cpp b/src/dawn_native/opengl/RenderPipelineGL.cpp
index 441df88..943dfbb 100644
--- a/src/dawn_native/opengl/RenderPipelineGL.cpp
+++ b/src/dawn_native/opengl/RenderPipelineGL.cpp
@@ -258,6 +258,11 @@
         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));