Enable all angle_end2end_tests targeting OpenGL and OpenGL ES backends.

Added failure supressions and filed bugs for failing tests.

BUG=angleproject:1145
BUG=angleproject:1289
BUG=angleproject:1291
BUG=angleproject:1292
BUG=angleproject:1293
BUG=angleproject:1296

Change-Id: Ida78ba855500fe8a6ce6154d43ee01520330e3b1
Reviewed-on: https://chromium-review.googlesource.com/322695
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/tests/gl_tests/GLSLTest.cpp b/src/tests/gl_tests/GLSLTest.cpp
index 0be58e9..40d685f 100644
--- a/src/tests/gl_tests/GLSLTest.cpp
+++ b/src/tests/gl_tests/GLSLTest.cpp
@@ -462,6 +462,24 @@
 
 TEST_P(GLSLTest, ScopedStructsOrderBug)
 {
+#if defined(__APPLE__)
+    // TODO(geofflang): Find out why this doesn't compile on Apple OpenGL drivers
+    // (http://anglebug.com/1292)
+    if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
+    {
+        std::cout << "Test disabled on Apple OpenGL." << std::endl;
+        return;
+    }
+#elif defined(_WIN32)
+    // TODO(geofflang): Find out why this doesn't compile on Windows AMD OpenGL drivers
+    // (http://anglebug.com/1291)
+    if (isAMD() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
+    {
+        std::cout << "Test disabled on Windows AMD OpenGL." << std::endl;
+        return;
+    }
+#endif
+
     const std::string fragmentShaderSource = SHADER_SOURCE
     (
         precision mediump float;
@@ -616,6 +634,14 @@
 
 TEST_P(GLSLTest, InvariantVaryingOut)
 {
+    // TODO(geofflang): Some OpenGL drivers have compile errors when varyings do not have matching
+    // invariant attributes (http://anglebug.com/1293)
+    if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
+    {
+        std::cout << "Test disabled on OpenGL." << std::endl;
+        return;
+    }
+
     const std::string fragmentShaderSource = SHADER_SOURCE
     (
         precision mediump float;
@@ -687,6 +713,14 @@
 
 TEST_P(GLSLTest, InvariantVaryingIn)
 {
+    // TODO(geofflang): Some OpenGL drivers have compile errors when varyings do not have matching
+    // invariant attributes (http://anglebug.com/1293)
+    if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
+    {
+        std::cout << "Test disabled on OpenGL." << std::endl;
+        return;
+    }
+
     const std::string fragmentShaderSource = SHADER_SOURCE
     (
         precision mediump float;
@@ -748,6 +782,14 @@
 
 TEST_P(GLSLTest, InvariantAll)
 {
+    // TODO(geofflang): Some OpenGL drivers have compile errors when varyings do not have matching
+    // invariant attributes (http://anglebug.com/1293)
+    if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
+    {
+        std::cout << "Test disabled on OpenGL." << std::endl;
+        return;
+    }
+
     const std::string fragmentShaderSource = SHADER_SOURCE
     (
         precision mediump float;
@@ -784,6 +826,13 @@
 
 TEST_P(GLSLTest, MaxMinusTwoVaryingVec4PlusThreeSpecialVariables)
 {
+    // TODO(geofflang): Figure out why this fails on OpenGL AMD (http://anglebug.com/1291)
+    if (isAMD() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
+    {
+        std::cout << "Test disabled on OpenGL." << std::endl;
+        return;
+    }
+
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
 
@@ -791,7 +840,9 @@
     VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings - 2, 0, true, true, true, true);
 }
 
-TEST_P(GLSLTest, MaxVaryingVec4PlusFragCoord)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxVaryingVec4PlusFragCoord)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -801,7 +852,9 @@
     VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings, 0, true, false, false, false);
 }
 
-TEST_P(GLSLTest, MaxVaryingVec4PlusPointCoord)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxVaryingVec4PlusPointCoord)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -866,6 +919,13 @@
         return;
     }
 
+    if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE)
+    {
+        // TODO(geofflang): Figure out why this fails on NVIDIA's GLES driver
+        std::cout << "Test disabled on OpenGL ES." << std::endl;
+        return;
+    }
+
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
 
@@ -881,13 +941,22 @@
         return;
     }
 
+    if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE)
+    {
+        // TODO(geofflang): Figure out why this fails on NVIDIA's GLES driver
+        std::cout << "Test disabled on OpenGL ES." << std::endl;
+        return;
+    }
+
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
 
     VaryingTestBase(0, 0, 0, maxVaryings, 0, 0, 0, 0, false, false, false, true);
 }
 
-TEST_P(GLSLTest, MaxPlusOneVaryingVec3)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxPlusOneVaryingVec3)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -895,7 +964,9 @@
     VaryingTestBase(0, 0, 0, 0, maxVaryings + 1, 0, 0, 0, false, false, false, false);
 }
 
-TEST_P(GLSLTest, MaxPlusOneVaryingVec3Array)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxPlusOneVaryingVec3Array)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -903,7 +974,9 @@
     VaryingTestBase(0, 0, 0, 0, 0, maxVaryings / 2 + 1, 0, 0, false, false, false, false);
 }
 
-TEST_P(GLSLTest, MaxVaryingVec3AndOneVec2)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxVaryingVec3AndOneVec2)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -911,7 +984,9 @@
     VaryingTestBase(0, 0, 1, 0, maxVaryings, 0, 0, 0, false, false, false, false);
 }
 
-TEST_P(GLSLTest, MaxPlusOneVaryingVec2)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxPlusOneVaryingVec2)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -919,7 +994,9 @@
     VaryingTestBase(0, 0, 2 * maxVaryings + 1, 0, 0, 0, 0, 0, false, false, false, false);
 }
 
-TEST_P(GLSLTest, MaxVaryingVec3ArrayAndMaxPlusOneFloatArray)
+// Disabled because drivers are allowed to successfully compile shaders that have more than the
+// maximum number of varyings. (http://anglebug.com/1296)
+TEST_P(GLSLTest, DISABLED_MaxVaryingVec3ArrayAndMaxPlusOneFloatArray)
 {
     GLint maxVaryings = 0;
     glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
@@ -1253,6 +1330,13 @@
 // can actually be used along with the maximum number of texture samplers.
 TEST_P(GLSLTest, VerifyMaxVertexUniformVectorsWithSamplers)
 {
+    if (GetParam().eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE ||
+        GetParam().eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE)
+    {
+        std::cout << "Test disabled on OpenGL." << std::endl;
+        return;
+    }
+
     int maxUniforms = 10000;
     glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &maxUniforms);
     EXPECT_GL_NO_ERROR();
@@ -1292,6 +1376,13 @@
 // can actually be used along with the maximum number of texture samplers.
 TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsWithSamplers)
 {
+    if (GetParam().eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE ||
+        GetParam().eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE)
+    {
+        std::cout << "Test disabled on OpenGL." << std::endl;
+        return;
+    }
+
     int maxUniforms = 10000;
     glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &maxUniforms);
     EXPECT_GL_NO_ERROR();
@@ -1316,7 +1407,14 @@
 }
 
 // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
-ANGLE_INSTANTIATE_TEST(GLSLTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3());
+ANGLE_INSTANTIATE_TEST(GLSLTest,
+                       ES2_D3D9(),
+                       ES2_D3D11(),
+                       ES2_D3D11_FL9_3(),
+                       ES2_OPENGL(),
+                       ES3_OPENGL(),
+                       ES2_OPENGLES(),
+                       ES3_OPENGLES());
 
 // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
-ANGLE_INSTANTIATE_TEST(GLSLTest_ES3, ES3_D3D11());
+ANGLE_INSTANTIATE_TEST(GLSLTest_ES3, ES3_D3D11(), ES3_OPENGL(), ES3_OPENGLES());