Don't validate attribute types match for gl_VertexID and gl_InstanceID.

TEST=conformance2/glsl3/no-attribute-vertex-shader
TEST=deqp/functional/gles3/instancedrendering

BUG=angleproject:2012

Change-Id: I234410fabf6a8fcd87040c8085ca5dce82fa8932
Reviewed-on: https://chromium-review.googlesource.com/559851
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 d32eebc..3f9b385 100644
--- a/src/tests/gl_tests/WebGLCompatibilityTest.cpp
+++ b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
@@ -2881,6 +2881,34 @@
     glDeleteProgram(program);
 }
 
+// Test no attribute vertex shaders
+TEST_P(WebGL2CompatibilityTest, NoAttributeVertexShader)
+{
+    const std::string vertexShader =
+        "#version 300 es\n"
+        "void main()\n"
+        "{\n"
+        "\n"
+        "    ivec2 xy = ivec2(gl_VertexID % 2, (gl_VertexID / 2 + gl_VertexID / 3) % 2);\n"
+        "    gl_Position = vec4(vec2(xy) * 2. - 1., 0, 1);\n"
+        "}";
+    const std::string fragmentShader =
+        "#version 300 es\n"
+        "precision mediump float;\n"
+        "out vec4 result;\n"
+        "void main()\n"
+        "{\n"
+        "    result = vec4(0, 1, 0, 1);\n"
+        "}";
+
+    ANGLE_GL_PROGRAM(program, vertexShader, fragmentShader);
+    glUseProgram(program);
+
+    glDrawArrays(GL_TRIANGLES, 0, 6);
+    ASSERT_GL_NO_ERROR();
+    EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green);
+}
+
 // Use this to select which configurations (e.g. which renderer, which GLES major version) these
 // tests should be run against.
 ANGLE_INSTANTIATE_TEST(WebGLCompatibilityTest,