Fix inverted validation check for glClearBuffer.

The validation would generate the correct errors to satisfy tests but
would skip clears.

TEST=conformance2/reading/format-r11f-g11f-b10f.html
TEST=conformance2/reading/read-pixels-from-fbo-test.html
TEST=conformance2/rendering/clearbuffer-sub-source.html
TEST=deqp/functional/gles3/fbocolorbuffer/clear.html
TEST=deqp/functional/gles3/fboinvalidate/sub.html
TEST=deqp/functional/gles3/framebufferblit/default_framebuffer_*.html

BUG=angleproject:1954

Change-Id: I0f220d06f98b630be5d27c7ffb1837d4ef29e0ac
Reviewed-on: https://chromium-review.googlesource.com/558786
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index 44012b0..6c755e1 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -1557,7 +1557,7 @@
             if (context->getExtensions().webglCompatibility)
             {
                 constexpr GLenum validComponentTypes[] = {GL_INT};
-                if (ValidateWebGLFramebufferAttachmentClearType(
+                if (!ValidateWebGLFramebufferAttachmentClearType(
                         context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes)))
                 {
                     return false;
@@ -1598,7 +1598,7 @@
             if (context->getExtensions().webglCompatibility)
             {
                 constexpr GLenum validComponentTypes[] = {GL_UNSIGNED_INT};
-                if (ValidateWebGLFramebufferAttachmentClearType(
+                if (!ValidateWebGLFramebufferAttachmentClearType(
                         context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes)))
                 {
                     return false;
@@ -1632,7 +1632,7 @@
             {
                 constexpr GLenum validComponentTypes[] = {GL_FLOAT, GL_UNSIGNED_NORMALIZED,
                                                           GL_SIGNED_NORMALIZED};
-                if (ValidateWebGLFramebufferAttachmentClearType(
+                if (!ValidateWebGLFramebufferAttachmentClearType(
                         context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes)))
                 {
                     return false;