Don't no-op draw calls for zero count in validation.

Make the no-op happen in the Context, so we can properly generator
more errors for negative WebGL tests. Some validation tests still
need to check for no-ops, such as range checks.

BUG=angleproject:2050

Change-Id: I48d0b3cf640f7f128679600e5df108146cfd6348
Reviewed-on: https://chromium-review.googlesource.com/522869
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index 2e0c02f..0aa209d 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -1276,6 +1276,12 @@
         return false;
     }
 
+    // Skip range checks for no-op calls.
+    if (count <= 0)
+    {
+        return true;
+    }
+
     // Use the parameter buffer to retrieve and cache the index range.
     const auto &params        = context->getParams<HasIndexRange>();
     const auto &indexRangeOpt = params.getIndexRange();