Make GL_ANGLE_instanced_arrays enableable.
BUG=angleproject:1523
Change-Id: Id1dd5d0426c1b55bfd6cca8b0c8c73596080f2a9
Reviewed-on: https://chromium-review.googlesource.com/688101
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/tests/gl_tests/WebGLCompatibilityTest.cpp b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
index 4475a5d..0d098aa 100644
--- a/src/tests/gl_tests/WebGLCompatibilityTest.cpp
+++ b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
@@ -672,6 +672,32 @@
}
}
+// Test enabling the GL_ANGLE_instanced_arrays extension
+TEST_P(WebGLCompatibilityTest, EnableInstancedArraysExtension)
+{
+ EXPECT_FALSE(extensionEnabled("GL_ANGLE_instanced_arrays"));
+
+ // This extensions become core in in ES3/WebGL2.
+ ANGLE_SKIP_TEST_IF(getClientMajorVersion() >= 3);
+
+ GLint divisor = 0;
+ glGetVertexAttribiv(0, GL_VERTEX_ATTRIB_ARRAY_DIVISOR, &divisor);
+ EXPECT_GL_ERROR(GL_INVALID_ENUM);
+
+ glVertexAttribDivisorANGLE(0, 1);
+ EXPECT_GL_ERROR(GL_INVALID_OPERATION);
+
+ if (extensionRequestable("GL_ANGLE_instanced_arrays"))
+ {
+ glRequestExtensionANGLE("GL_ANGLE_instanced_arrays");
+ EXPECT_GL_NO_ERROR();
+
+ glGetVertexAttribiv(0, GL_VERTEX_ATTRIB_ARRAY_DIVISOR, &divisor);
+ glVertexAttribDivisorANGLE(0, 1);
+ EXPECT_GL_NO_ERROR();
+ }
+}
+
// Verify that the context generates the correct error when the framebuffer attachments are
// different sizes
TEST_P(WebGLCompatibilityTest, FramebufferAttachmentSizeMissmatch)