Vulkan: Enable dEQP point limit raster test.

This requires enabling a workaround in the ANGLE shader translator to
clamp the point size.

Bug: angleproject:2599
Change-Id: I3171bdca5dd2e5af965e94ee2a955f46f8d706da
Reviewed-on: https://chromium-review.googlesource.com/c/1412235
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 734908d..57f7808 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -1050,6 +1050,13 @@
         mFeatures.clampPointSize = true;
     }
 
+    // We also need to clamp point size on several Android drivers.
+    // TODO(jmadill): Remove suppression once fixed. http://anglebug.com/2599
+    if (IsAndroid())
+    {
+        mFeatures.clampPointSize = true;
+    }
+
 #if defined(ANGLE_PLATFORM_ANDROID)
     // Work around ineffective compute-graphics barriers on Nexus 5X.
     // TODO(syoussefi): Figure out which other vendors and driver versions are affected.
diff --git a/src/tests/deqp_support/deqp_gles2_test_expectations.txt b/src/tests/deqp_support/deqp_gles2_test_expectations.txt
index b46d416..c41c4df 100644
--- a/src/tests/deqp_support/deqp_gles2_test_expectations.txt
+++ b/src/tests/deqp_support/deqp_gles2_test_expectations.txt
@@ -199,7 +199,6 @@
 
 // Fails on Nexus 5x only. TODO(jmadill): Remove suppression when possible. http://anglebug.com/2791
 2791 VULKAN ANDROID : dEQP-GLES2.functional.clipping.* = SKIP
-2599 VULKAN ANDROID : dEQP-GLES2.functional.rasterization.limits.points = FAIL
 
 // Failing on the Pixel 2.
 2727 VULKAN ANDROID : dEQP-GLES2.functional.shaders.builtin_variable.pointcoord = FAIL
diff --git a/src/tests/gl_tests/GLSLTest.cpp b/src/tests/gl_tests/GLSLTest.cpp
index 7e79a84..c7ae398 100644
--- a/src/tests/gl_tests/GLSLTest.cpp
+++ b/src/tests/gl_tests/GLSLTest.cpp
@@ -4696,6 +4696,9 @@
     // AMD's OpenGL drivers may have the same issue. http://anglebug.com/1643
     ANGLE_SKIP_TEST_IF(IsAMD() && IsWindows() && IsOpenGL());
 
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     constexpr char kPointCoordVS[] = R"(attribute vec2 position;
 uniform vec2 viewportSize;
 void main()
diff --git a/src/tests/gl_tests/IndexedPointsTest.cpp b/src/tests/gl_tests/IndexedPointsTest.cpp
index d59c14e..b648959 100644
--- a/src/tests/gl_tests/IndexedPointsTest.cpp
+++ b/src/tests/gl_tests/IndexedPointsTest.cpp
@@ -197,21 +197,33 @@
 
 TEST_P(IndexedPointsTestUByte, UnsignedByteOffset0)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(0);
 }
 
 TEST_P(IndexedPointsTestUByte, UnsignedByteOffset1)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(1);
 }
 
 TEST_P(IndexedPointsTestUByte, UnsignedByteOffset2)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(2);
 }
 
 TEST_P(IndexedPointsTestUByte, UnsignedByteOffset3)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(3);
 }
 
@@ -220,6 +232,9 @@
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
 
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(0, true);
 }
 
@@ -227,6 +242,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(1, true);
 }
 
@@ -234,6 +253,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(2, true);
 }
 
@@ -241,6 +264,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(3, true);
 }
 
@@ -248,21 +275,33 @@
 
 TEST_P(IndexedPointsTestUShort, UnsignedShortOffset0)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(0);
 }
 
 TEST_P(IndexedPointsTestUShort, UnsignedShortOffset1)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(1);
 }
 
 TEST_P(IndexedPointsTestUShort, UnsignedShortOffset2)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(2);
 }
 
 TEST_P(IndexedPointsTestUShort, UnsignedShortOffset3)
 {
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(3);
 }
 
@@ -270,6 +309,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(0, true);
 }
 
@@ -277,6 +320,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(1, true);
 }
 
@@ -284,6 +331,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(2, true);
 }
 
@@ -291,6 +342,10 @@
 {
     // TODO(fjhenigman): Fix with buffer offset http://anglebug.com/2848
     ANGLE_SKIP_TEST_IF(IsVulkan() && IsAMD());
+
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(3, true);
 }
 
@@ -302,6 +357,9 @@
     // TODO(fjhenigman): Figure out why this fails on Ozone Intel.
     ANGLE_SKIP_TEST_IF(IsOzone() && IsIntel() && IsOpenGLES());
 
+    // http://anglebug.com/2599: Fails on the 5x due to driver bug.
+    ANGLE_SKIP_TEST_IF(IsAndroid() && IsVulkan());
+
     runTest(3, true);
     runTest(1, true);
     runTest(0, true);