Make GL_EXT_blend_minmax enableable.
BUG=angleproject:1523
Change-Id: I73df8d9a23c3d22792abde44b495be7478abfc22
Reviewed-on: https://chromium-review.googlesource.com/685648
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/gl_tests/WebGLCompatibilityTest.cpp b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
index 4f799a1..9fe6d1e 100644
--- a/src/tests/gl_tests/WebGLCompatibilityTest.cpp
+++ b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
@@ -552,6 +552,31 @@
}
}
+// Test enabling the GL_EXT_blend_minmax extension
+TEST_P(WebGLCompatibilityTest, EnableBlendMinMaxExtension)
+{
+ EXPECT_FALSE(extensionEnabled("GL_EXT_blend_minmax"));
+
+ // This extensions become core in in ES3/WebGL2.
+ ANGLE_SKIP_TEST_IF(getClientMajorVersion() >= 3);
+
+ glBlendEquation(GL_MIN);
+ EXPECT_GL_ERROR(GL_INVALID_ENUM);
+
+ glBlendEquation(GL_MAX);
+ EXPECT_GL_ERROR(GL_INVALID_ENUM);
+
+ if (extensionRequestable("GL_EXT_blend_minmax"))
+ {
+ glRequestExtensionANGLE("GL_EXT_blend_minmax");
+ EXPECT_GL_NO_ERROR();
+
+ glBlendEquation(GL_MIN);
+ glBlendEquation(GL_MAX);
+ EXPECT_GL_NO_ERROR();
+ }
+}
+
// Verify that the context generates the correct error when the framebuffer attachments are
// different sizes
TEST_P(WebGLCompatibilityTest, FramebufferAttachmentSizeMissmatch)