Support CHROMIUM_framebuffer_mixed_samples in the GL backend

BUG=angleproject:1378

Change-Id: I634c41f3507dbdeaa56234c4de1b498f81c848ed
Reviewed-on: https://chromium-review.googlesource.com/344520
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 454364c..6e38100 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2056,4 +2056,28 @@
     return true;
 }
 
+bool ValidateCoverageModulationCHROMIUM(Context* context, GLenum components)
+{
+    if (!context->getExtensions().framebufferMixedSamples)
+    {
+        context->handleError(
+            Error(GL_INVALID_OPERATION, "GL_CHROMIUM_framebuffer_mixed_samples is not available."));
+        return false;
+    }
+    switch (components)
+    {
+        case GL_RGB:
+        case GL_RGBA:
+        case GL_ALPHA:
+        case GL_NONE:
+            break;
+        default:
+            context->handleError(
+                Error(GL_INVALID_ENUM, "GLenum components is not one of GL_RGB, GL_RGBA, GL_ALPHA or GL_NONE."));
+            return false;
+    }
+
+    return true;
+}
+
 }  // namespace gl