Add error messages for BlitFramebuffer related errors

These are particularly helpful when debugging multiview rendering that
requires a framebuffer blit.

Existing blitFramebuffer error message strings are moved to
ErrorStrings.h.

BUG=angleproject:1617
TEST=angle_end2end_tests

Change-Id: I6e8b45355045d80abf044714ac4b9d818c53bf46
Reviewed-on: https://chromium-review.googlesource.com/1175125
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 88d775f..4e037da 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2440,22 +2440,20 @@
 {
     if (!context->getExtensions().framebufferBlit)
     {
-        context->handleError(InvalidOperation() << "Blit extension not available.");
+        ANGLE_VALIDATION_ERR(context, InvalidOperation(), BlitExtensionNotAvailable);
         return false;
     }
 
     if (srcX1 - srcX0 != dstX1 - dstX0 || srcY1 - srcY0 != dstY1 - dstY0)
     {
         // TODO(jmadill): Determine if this should be available on other implementations.
-        context->handleError(InvalidOperation() << "Scaling and flipping in "
-                                                   "BlitFramebufferANGLE not supported by this "
-                                                   "implementation.");
+        ANGLE_VALIDATION_ERR(context, InvalidOperation(), BlitExtensionScaleOrFlip);
         return false;
     }
 
     if (filter == GL_LINEAR)
     {
-        context->handleError(InvalidEnum() << "Linear blit not supported in this extension");
+        ANGLE_VALIDATION_ERR(context, InvalidEnum(), BlitExtensionLinear);
         return false;
     }
 
@@ -2474,7 +2472,8 @@
                 readColorAttachment->type() != GL_RENDERBUFFER &&
                 readColorAttachment->type() != GL_FRAMEBUFFER_DEFAULT)
             {
-                context->handleError(InvalidOperation());
+                ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                     BlitExtensionFromInvalidAttachmentType);
                 return false;
             }
 
@@ -2490,7 +2489,8 @@
                         attachment->type() != GL_RENDERBUFFER &&
                         attachment->type() != GL_FRAMEBUFFER_DEFAULT)
                     {
-                        context->handleError(InvalidOperation());
+                        ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                             BlitExtensionToInvalidAttachmentType);
                         return false;
                     }
 
@@ -2498,7 +2498,8 @@
                     if (!Format::EquivalentForBlit(attachment->getFormat(),
                                                    readColorAttachment->getFormat()))
                     {
-                        context->handleError(InvalidOperation());
+                        ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                             BlitExtensionFormatMismatch);
                         return false;
                     }
                 }
@@ -2509,7 +2510,8 @@
                 IsPartialBlit(context, readColorAttachment, drawColorAttachment, srcX0, srcY0,
                               srcX1, srcY1, dstX0, dstY0, dstX1, dstY1))
             {
-                context->handleError(InvalidOperation());
+                ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                     BlitExtensionMultisampledWholeBufferBlit);
                 return false;
             }
         }
@@ -2532,15 +2534,15 @@
                                   dstX0, dstY0, dstX1, dstY1))
                 {
                     // only whole-buffer copies are permitted
-                    context->handleError(InvalidOperation() << "Only whole-buffer depth and "
-                                                               "stencil blits are supported by "
-                                                               "this extension.");
+                    ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                         BlitExtensionDepthStencilWholeBufferBlit);
                     return false;
                 }
 
                 if (readBuffer->getSamples() != 0 || drawBuffer->getSamples() != 0)
                 {
-                    context->handleError(InvalidOperation());
+                    ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                         BlitExtensionMultisampledDepthOrStencil);
                     return false;
                 }
             }