Slight refactor to ErrorStrings.h.

Allows for better readability. Also sort the error strings by ID.

Bug: angleproject:2957
Change-Id: Ib3900a4c90507ac84496fd5ff916417eb768667b
Reviewed-on: https://chromium-review.googlesource.com/c/1337461
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index a038c99..b499f1f 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -25,6 +25,7 @@
 
 namespace gl
 {
+using namespace err;
 
 namespace
 {
@@ -37,7 +38,7 @@
 {
     if (!context->getExtensions().multiview)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorMultiviewNotAvailable);
+        context->validationError(GL_INVALID_OPERATION, kMultiviewNotAvailable);
         return false;
     }
 
@@ -48,14 +49,14 @@
 
     if (texture != 0 && numViews < 1)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorMultiviewViewsTooSmall);
+        context->validationError(GL_INVALID_VALUE, kMultiviewViewsTooSmall);
         return false;
     }
 
     const Extensions &extensions = context->getExtensions();
     if (static_cast<GLuint>(numViews) > extensions.maxViews)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorMultiviewViewsTooLarge);
+        context->validationError(GL_INVALID_VALUE, kMultiviewViewsTooLarge);
         return false;
     }
 
@@ -69,14 +70,14 @@
     TextureType type = texture->getType();
     if (!ValidMipLevel(context, type, level))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidMipLevel);
+        context->validationError(GL_INVALID_VALUE, kInvalidMipLevel);
         return false;
     }
 
     const auto &format = texture->getFormat(NonCubeTextureTypeToTarget(type), level);
     if (format.info->compressed)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorCompressedTexturesNotAttachable);
+        context->validationError(GL_INVALID_OPERATION, kCompressedTexturesNotAttachable);
         return false;
     }
     return true;
@@ -86,7 +87,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -102,7 +103,7 @@
     // Check for ES3 uniform entry points
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -113,7 +114,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateGenOrDelete(context, n);
@@ -123,12 +124,12 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     if (count < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeCount);
+        context->validationError(GL_INVALID_VALUE, kNegativeCount);
         return false;
     }
     return true;
@@ -145,19 +146,19 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (!context->getExtensions().copyTexture3d)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorANGLECopyTexture3DUnavailable);
+        context->validationError(GL_INVALID_OPERATION, kANGLECopyTexture3DUnavailable);
         return false;
     }
 
     if (!ValidTexture3DTarget(context, source->getType()))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -179,13 +180,13 @@
         case GL_DEPTH_STENCIL:
             break;
         default:
-            context->validationError(GL_INVALID_OPERATION, kErrorInvalidInternalFormat);
+            context->validationError(GL_INVALID_OPERATION, kInvalidInternalFormat);
             return false;
     }
 
     if (!ValidTexture3DTarget(context, TextureTargetToType(destTarget)))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -249,7 +250,7 @@
         case GL_RGBA32UI:
             break;
         default:
-            context->validationError(GL_INVALID_OPERATION, kErrorInvalidInternalFormat);
+            context->validationError(GL_INVALID_OPERATION, kInvalidInternalFormat);
             return false;
     }
 
@@ -267,13 +268,13 @@
     // The type and format are valid if any supported internal format has that type and format
     if (!ValidES3Format(format))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidFormat);
+        context->validationError(GL_INVALID_ENUM, kInvalidFormat);
         return false;
     }
 
     if (!ValidES3Type(type))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidType);
+        context->validationError(GL_INVALID_ENUM, kInvalidType);
         return false;
     }
 
@@ -283,7 +284,7 @@
     // the validation codepaths for glTexImage2D/3D, we record a GL_INVALID_VALUE error.
     if (!ValidES3InternalFormat(internalFormat))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidInternalFormat);
+        context->validationError(GL_INVALID_VALUE, kInvalidInternalFormat);
         return false;
     }
 
@@ -294,21 +295,21 @@
     // INVALID_OPERATION error.
     if (target == TextureType::_3D && (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL))
     {
-        context->validationError(GL_INVALID_OPERATION, kError3DDepthStencil);
+        context->validationError(GL_INVALID_OPERATION, k3DDepthStencil);
         return false;
     }
 
     // Check if this is a valid format combination to load texture data
     if (!ValidES3FormatCombination(format, type, internalFormat))
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorInvalidFormatCombination);
+        context->validationError(GL_INVALID_OPERATION, kInvalidFormatCombination);
         return false;
     }
 
     const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat, type);
     if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorInvalidInternalFormat);
+        context->validationError(GL_INVALID_OPERATION, kInvalidInternalFormat);
         return false;
     }
 
@@ -345,13 +346,13 @@
     // Verify zero border
     if (border != 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidBorder);
+        context->validationError(GL_INVALID_VALUE, kInvalidBorder);
         return false;
     }
 
     if (xoffset < 0 || yoffset < 0 || zoffset < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeOffset);
+        context->validationError(GL_INVALID_VALUE, kNegativeOffset);
         return false;
     }
 
@@ -359,7 +360,7 @@
         std::numeric_limits<GLsizei>::max() - yoffset < height ||
         std::numeric_limits<GLsizei>::max() - zoffset < depth)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorOffsetOverflow);
+        context->validationError(GL_INVALID_VALUE, kOffsetOverflow);
         return false;
     }
 
@@ -371,7 +372,7 @@
             if (static_cast<GLuint>(width) > (caps.max2DTextureSize >> level) ||
                 static_cast<GLuint>(height) > (caps.max2DTextureSize >> level))
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
             break;
@@ -381,12 +382,12 @@
             if (static_cast<GLuint>(width) > caps.maxRectangleTextureSize ||
                 static_cast<GLuint>(height) > caps.maxRectangleTextureSize)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
             if (isCompressed)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorRectangleTextureCompressed);
+                context->validationError(GL_INVALID_ENUM, kRectangleTextureCompressed);
                 return false;
             }
             break;
@@ -394,13 +395,13 @@
         case TextureType::CubeMap:
             if (!isSubImage && width != height)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorCubemapFacesEqualDimensions);
+                context->validationError(GL_INVALID_VALUE, kCubemapFacesEqualDimensions);
                 return false;
             }
 
             if (static_cast<GLuint>(width) > (caps.maxCubeMapTextureSize >> level))
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
             break;
@@ -410,7 +411,7 @@
                 static_cast<GLuint>(height) > (caps.max3DTextureSize >> level) ||
                 static_cast<GLuint>(depth) > (caps.max3DTextureSize >> level))
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
             break;
@@ -420,26 +421,26 @@
                 static_cast<GLuint>(height) > (caps.max2DTextureSize >> level) ||
                 static_cast<GLuint>(depth) > caps.maxArrayTextureLayers)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
     gl::Texture *texture = context->getTargetTexture(texType);
     if (!texture)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorMissingTexture);
+        context->validationError(GL_INVALID_OPERATION, kMissingTexture);
         return false;
     }
 
     if (texture->getImmutableFormat() && !isSubImage)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTextureIsImmutable);
+        context->validationError(GL_INVALID_OPERATION, kTextureIsImmutable);
         return false;
     }
 
@@ -484,7 +485,7 @@
 
             if (actualInternalFormat == GL_ETC1_RGB8_OES)
             {
-                context->validationError(GL_INVALID_OPERATION, kErrorInvalidInternalFormat);
+                context->validationError(GL_INVALID_OPERATION, kInvalidInternalFormat);
                 return false;
             }
         }
@@ -500,13 +501,13 @@
 
         if (!actualFormatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
         {
-            context->validationError(GL_INVALID_ENUM, kErrorInvalidFormat);
+            context->validationError(GL_INVALID_ENUM, kInvalidFormat);
             return false;
         }
 
         if (texType == TextureType::_3D)
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorInvalidTextureTarget);
+            context->validationError(GL_INVALID_OPERATION, kInvalidTextureTarget);
             return false;
         }
     }
@@ -524,13 +525,13 @@
     {
         if (isCompressed != actualFormatInfo.compressed)
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorCompressedMismatch);
+            context->validationError(GL_INVALID_OPERATION, kCompressedMismatch);
             return false;
         }
 
         if (xoffset < 0 || yoffset < 0 || zoffset < 0)
         {
-            context->validationError(GL_INVALID_VALUE, kErrorNegativeOffset);
+            context->validationError(GL_INVALID_VALUE, kNegativeOffset);
             return false;
         }
 
@@ -538,7 +539,7 @@
             std::numeric_limits<GLsizei>::max() - yoffset < height ||
             std::numeric_limits<GLsizei>::max() - zoffset < depth)
         {
-            context->validationError(GL_INVALID_VALUE, kErrorOffsetOverflow);
+            context->validationError(GL_INVALID_VALUE, kOffsetOverflow);
             return false;
         }
 
@@ -546,14 +547,14 @@
             static_cast<size_t>(yoffset + height) > texture->getHeight(target, level) ||
             static_cast<size_t>(zoffset + depth) > texture->getDepth(target, level))
         {
-            context->validationError(GL_INVALID_VALUE, kErrorOffsetOverflow);
+            context->validationError(GL_INVALID_VALUE, kOffsetOverflow);
             return false;
         }
 
         if (width > 0 && height > 0 && depth > 0 && pixels == nullptr &&
             context->getGLState().getTargetBuffer(gl::BufferBinding::PixelUnpack) == nullptr)
         {
-            context->validationError(GL_INVALID_VALUE, kErrorPixelDataNull);
+            context->validationError(GL_INVALID_VALUE, kPixelDataNull);
             return false;
         }
     }
@@ -617,7 +618,7 @@
 {
     if (!ValidTexture2DDestinationTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -646,14 +647,14 @@
 {
     if (!ValidTexture3DDestinationTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
     if (IsETC2EACFormat(format) && target != TextureType::_2DArray)
     {
         // ES 3.1, Section 8.7, page 169.
-        context->validationError(GL_INVALID_OPERATION, kErrorInternalFormatRequiresTexture2DArray);
+        context->validationError(GL_INVALID_OPERATION, kInternalFormatRequiresTexture2DArray);
         return false;
     }
 
@@ -948,7 +949,7 @@
     // is RGB9_E5 and copy to such a texture, generate INVALID_OPERATION.
     if (textureFormat.info->internalFormat == GL_RGB9_E5)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorInvalidFormat);
+        context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
         return false;
     }
 
@@ -957,7 +958,7 @@
         if (!IsValidES3CopyTexImageCombination(*textureFormat.info, *source->getFormat().info,
                                                readFramebufferID))
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorInvalidCopyCombination);
+            context->validationError(GL_INVALID_OPERATION, kInvalidCopyCombination);
             return false;
         }
     }
@@ -968,7 +969,7 @@
         const InternalFormat &copyFormat = GetInternalFormatInfo(internalformat, GL_UNSIGNED_BYTE);
         if (!IsValidES3CopyTexImageCombination(copyFormat, framebufferFormat, readFramebufferID))
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorInvalidCopyCombination);
+            context->validationError(GL_INVALID_OPERATION, kInvalidCopyCombination);
             return false;
         }
     }
@@ -993,7 +994,7 @@
 {
     if (!ValidTexture2DDestinationTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -1018,7 +1019,7 @@
 {
     if (!ValidTexture3DDestinationTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -1037,7 +1038,7 @@
 {
     if (width < 1 || height < 1 || depth < 1 || levels < 1)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorTextureSizeTooSmall);
+        context->validationError(GL_INVALID_VALUE, kTextureSizeTooSmall);
         return false;
     }
 
@@ -1049,7 +1050,7 @@
 
     if (levels > gl::log2(maxDim) + 1)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorInvalidMipLevels);
+        context->validationError(GL_INVALID_OPERATION, kInvalidMipLevels);
         return false;
     }
 
@@ -1062,7 +1063,7 @@
             if (static_cast<GLuint>(width) > caps.max2DTextureSize ||
                 static_cast<GLuint>(height) > caps.max2DTextureSize)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
         }
@@ -1072,14 +1073,14 @@
         {
             if (levels != 1)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidMipLevels);
+                context->validationError(GL_INVALID_VALUE, kInvalidMipLevels);
                 return false;
             }
 
             if (static_cast<GLuint>(width) > caps.maxRectangleTextureSize ||
                 static_cast<GLuint>(height) > caps.maxRectangleTextureSize)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
         }
@@ -1089,13 +1090,13 @@
         {
             if (width != height)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorCubemapFacesEqualDimensions);
+                context->validationError(GL_INVALID_VALUE, kCubemapFacesEqualDimensions);
                 return false;
             }
 
             if (static_cast<GLuint>(width) > caps.maxCubeMapTextureSize)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
         }
@@ -1107,7 +1108,7 @@
                 static_cast<GLuint>(height) > caps.max3DTextureSize ||
                 static_cast<GLuint>(depth) > caps.max3DTextureSize)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
         }
@@ -1119,7 +1120,7 @@
                 static_cast<GLuint>(height) > caps.max2DTextureSize ||
                 static_cast<GLuint>(depth) > caps.maxArrayTextureLayers)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorResourceMaxTextureSize);
+                context->validationError(GL_INVALID_VALUE, kResourceMaxTextureSize);
                 return false;
             }
         }
@@ -1133,32 +1134,32 @@
     gl::Texture *texture = context->getTargetTexture(target);
     if (!texture || texture->id() == 0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorMissingTexture);
+        context->validationError(GL_INVALID_OPERATION, kMissingTexture);
         return false;
     }
 
     if (texture->getImmutableFormat())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTextureIsImmutable);
+        context->validationError(GL_INVALID_OPERATION, kTextureIsImmutable);
         return false;
     }
 
     const gl::InternalFormat &formatInfo = gl::GetSizedInternalFormatInfo(internalformat);
     if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidFormat);
+        context->validationError(GL_INVALID_ENUM, kInvalidFormat);
         return false;
     }
 
     if (!formatInfo.sized)
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidFormat);
+        context->validationError(GL_INVALID_ENUM, kInvalidFormat);
         return false;
     }
 
     if (formatInfo.compressed && target == TextureType::Rectangle)
     {
-        context->validationError(GL_INVALID_ENUM, kErrorRectangleTextureCompressed);
+        context->validationError(GL_INVALID_ENUM, kRectangleTextureCompressed);
         return false;
     }
 
@@ -1175,7 +1176,7 @@
 {
     if (!ValidTexture2DTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -1193,7 +1194,7 @@
 {
     if (!ValidTexture3DTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -1205,7 +1206,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1216,7 +1217,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1227,7 +1228,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1238,7 +1239,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1254,7 +1255,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1268,7 +1269,7 @@
     {
         if (layer < 0)
         {
-            context->validationError(GL_INVALID_VALUE, kErrorNegativeLayer);
+            context->validationError(GL_INVALID_VALUE, kNegativeLayer);
             return false;
         }
 
@@ -1281,15 +1282,13 @@
             {
                 if (level > gl::log2(caps.max2DTextureSize))
                 {
-                    context->validationError(GL_INVALID_VALUE,
-                                             kErrorFramebufferTextureInvalidMipLevel);
+                    context->validationError(GL_INVALID_VALUE, kFramebufferTextureInvalidMipLevel);
                     return false;
                 }
 
                 if (static_cast<GLuint>(layer) >= caps.maxArrayTextureLayers)
                 {
-                    context->validationError(GL_INVALID_VALUE,
-                                             kErrorFramebufferTextureInvalidLayer);
+                    context->validationError(GL_INVALID_VALUE, kFramebufferTextureInvalidLayer);
                     return false;
                 }
             }
@@ -1299,15 +1298,13 @@
             {
                 if (level > gl::log2(caps.max3DTextureSize))
                 {
-                    context->validationError(GL_INVALID_VALUE,
-                                             kErrorFramebufferTextureInvalidMipLevel);
+                    context->validationError(GL_INVALID_VALUE, kFramebufferTextureInvalidMipLevel);
                     return false;
                 }
 
                 if (static_cast<GLuint>(layer) >= caps.max3DTextureSize)
                 {
-                    context->validationError(GL_INVALID_VALUE,
-                                             kErrorFramebufferTextureInvalidLayer);
+                    context->validationError(GL_INVALID_VALUE, kFramebufferTextureInvalidLayer);
                     return false;
                 }
             }
@@ -1317,15 +1314,13 @@
             {
                 if (level != 0)
                 {
-                    context->validationError(GL_INVALID_VALUE,
-                                             kErrorFramebufferTextureInvalidMipLevel);
+                    context->validationError(GL_INVALID_VALUE, kFramebufferTextureInvalidMipLevel);
                     return false;
                 }
 
                 if (static_cast<GLuint>(layer) >= caps.maxArrayTextureLayers)
                 {
-                    context->validationError(GL_INVALID_VALUE,
-                                             kErrorFramebufferTextureInvalidLayer);
+                    context->validationError(GL_INVALID_VALUE, kFramebufferTextureInvalidLayer);
                     return false;
                 }
             }
@@ -1333,14 +1328,14 @@
 
             default:
                 context->validationError(GL_INVALID_OPERATION,
-                                         kErrorFramebufferTextureLayerIncorrectTextureType);
+                                         kFramebufferTextureLayerIncorrectTextureType);
                 return false;
         }
 
         const auto &format = tex->getFormat(NonCubeTextureTypeToTarget(tex->getType()), level);
         if (format.info->compressed)
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorCompressedTexturesNotAttachable);
+            context->validationError(GL_INVALID_OPERATION, kCompressedTexturesNotAttachable);
             return false;
         }
     }
@@ -1355,7 +1350,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1371,7 +1366,7 @@
             defaultFramebuffer = context->getGLState().getReadFramebuffer()->id() == 0;
             break;
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorInvalidFramebufferTarget);
+            context->validationError(GL_INVALID_ENUM, kInvalidFramebufferTarget);
             return false;
     }
 
@@ -1390,7 +1385,7 @@
 {
     if (width < 0 || height < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeSize);
+        context->validationError(GL_INVALID_VALUE, kNegativeSize);
         return false;
     }
 
@@ -1401,7 +1396,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1423,7 +1418,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1462,7 +1457,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1473,7 +1468,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1534,13 +1529,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (!ValidTextureTarget(context, target))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidTextureTarget);
+        context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
         return false;
     }
 
@@ -1554,20 +1549,20 @@
     const InternalFormat &formatInfo = GetSizedInternalFormatInfo(internalformat);
     if (!formatInfo.compressed)
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidCompressedFormat);
+        context->validationError(GL_INVALID_ENUM, kInvalidCompressedFormat);
         return false;
     }
 
     GLuint blockSize = 0;
     if (!formatInfo.computeCompressedImageSize(gl::Extents(width, height, depth), &blockSize))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorIntegerOverflow);
+        context->validationError(GL_INVALID_VALUE, kIntegerOverflow);
         return false;
     }
 
     if (imageSize < 0 || static_cast<GLuint>(imageSize) != blockSize)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidCompressedImageSize);
+        context->validationError(GL_INVALID_VALUE, kInvalidCompressedImageSize);
         return false;
     }
 
@@ -1615,7 +1610,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1626,7 +1621,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1642,7 +1637,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1798,7 +1793,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1814,7 +1809,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1825,7 +1820,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1839,7 +1834,7 @@
         case GL_PROGRAM_BINARY_RETRIEVABLE_HINT:
             if (value != GL_FALSE && value != GL_TRUE)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidBooleanValue);
+                context->validationError(GL_INVALID_VALUE, kInvalidBooleanValue);
                 return false;
             }
             break;
@@ -1847,19 +1842,19 @@
         case GL_PROGRAM_SEPARABLE:
             if (context->getClientVersion() < ES_3_1)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorES31Required);
+                context->validationError(GL_INVALID_ENUM, kES31Required);
                 return false;
             }
 
             if (value != GL_FALSE && value != GL_TRUE)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidBooleanValue);
+                context->validationError(GL_INVALID_VALUE, kInvalidBooleanValue);
                 return false;
             }
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorInvalidPname);
+            context->validationError(GL_INVALID_ENUM, kInvalidPname);
             return false;
     }
 
@@ -1880,7 +1875,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -1896,7 +1891,7 @@
             if (drawbuffer < 0 ||
                 static_cast<GLuint>(drawbuffer) >= context->getCaps().maxDrawBuffers)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxDrawBuffer);
+                context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
                 return false;
             }
             if (context->getExtensions().webglCompatibility)
@@ -1913,13 +1908,13 @@
         case GL_STENCIL:
             if (drawbuffer != 0)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidDepthStencilDrawBuffer);
+                context->validationError(GL_INVALID_VALUE, kInvalidDepthStencilDrawBuffer);
                 return false;
             }
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -1934,7 +1929,7 @@
             if (drawbuffer < 0 ||
                 static_cast<GLuint>(drawbuffer) >= context->getCaps().maxDrawBuffers)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxDrawBuffer);
+                context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
                 return false;
             }
             if (context->getExtensions().webglCompatibility)
@@ -1949,7 +1944,7 @@
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -1964,7 +1959,7 @@
             if (drawbuffer < 0 ||
                 static_cast<GLuint>(drawbuffer) >= context->getCaps().maxDrawBuffers)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxDrawBuffer);
+                context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
                 return false;
             }
             if (context->getExtensions().webglCompatibility)
@@ -1982,13 +1977,13 @@
         case GL_DEPTH:
             if (drawbuffer != 0)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidDepthStencilDrawBuffer);
+                context->validationError(GL_INVALID_VALUE, kInvalidDepthStencilDrawBuffer);
                 return false;
             }
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -2006,13 +2001,13 @@
         case GL_DEPTH_STENCIL:
             if (drawbuffer != 0)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidDepthStencilDrawBuffer);
+                context->validationError(GL_INVALID_VALUE, kInvalidDepthStencilDrawBuffer);
                 return false;
             }
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -2023,7 +2018,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2043,7 +2038,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2066,7 +2061,7 @@
     const Texture *source = context->getTexture(sourceId);
     if (source == nullptr)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidSourceTexture);
+        context->validationError(GL_INVALID_VALUE, kInvalidSourceTexture);
         return false;
     }
 
@@ -2078,7 +2073,7 @@
     const Texture *dest = context->getTexture(destId);
     if (dest == nullptr)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidDestinationTexture);
+        context->validationError(GL_INVALID_VALUE, kInvalidDestinationTexture);
         return false;
     }
 
@@ -2091,7 +2086,7 @@
 
     if (!ValidMipLevel(context, source->getType(), sourceLevel))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidSourceTextureLevel);
+        context->validationError(GL_INVALID_VALUE, kInvalidSourceTextureLevel);
         return false;
     }
 
@@ -2099,13 +2094,13 @@
     GLsizei sourceHeight = static_cast<GLsizei>(source->getHeight(sourceTarget, sourceLevel));
     if (sourceWidth == 0 || sourceHeight == 0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorInvalidSourceTextureSize);
+        context->validationError(GL_INVALID_OPERATION, kInvalidSourceTextureSize);
         return false;
     }
 
     if (dest->getImmutableFormat())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorDestinationImmutable);
+        context->validationError(GL_INVALID_OPERATION, kDestinationImmutable);
         return false;
     }
 
@@ -2134,7 +2129,7 @@
     const Texture *source = context->getTexture(sourceId);
     if (source == nullptr)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidSourceTexture);
+        context->validationError(GL_INVALID_VALUE, kInvalidSourceTexture);
         return false;
     }
 
@@ -2146,7 +2141,7 @@
     const Texture *dest = context->getTexture(destId);
     if (dest == nullptr)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidDestinationTexture);
+        context->validationError(GL_INVALID_VALUE, kInvalidDestinationTexture);
         return false;
     }
 
@@ -2161,13 +2156,13 @@
 
     if (x < 0 || y < 0 || z < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeXYZ);
+        context->validationError(GL_INVALID_VALUE, kNegativeXYZ);
         return false;
     }
 
     if (width < 0 || height < 0 || depth < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeHeightWidthDepth);
+        context->validationError(GL_INVALID_VALUE, kNegativeHeightWidthDepth);
         return false;
     }
 
@@ -2175,19 +2170,19 @@
         static_cast<size_t>(y + height) > source->getHeight(sourceTarget, sourceLevel) ||
         static_cast<size_t>(z + depth) > source->getDepth(sourceTarget, sourceLevel))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorSourceTextureTooSmall);
+        context->validationError(GL_INVALID_VALUE, kSourceTextureTooSmall);
         return false;
     }
 
     if (TextureTargetToType(destTarget) != dest->getType())
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidDestinationTextureType);
+        context->validationError(GL_INVALID_VALUE, kInvalidDestinationTextureType);
         return false;
     }
 
     if (xoffset < 0 || yoffset < 0 || zoffset < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeOffset);
+        context->validationError(GL_INVALID_VALUE, kNegativeOffset);
         return false;
     }
 
@@ -2195,7 +2190,7 @@
         static_cast<size_t>(yoffset + height) > dest->getHeight(destTarget, destLevel) ||
         static_cast<size_t>(zoffset + depth) > dest->getDepth(destTarget, destLevel))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorDestinationTextureTooSmall);
+        context->validationError(GL_INVALID_VALUE, kDestinationTextureTooSmall);
         return false;
     }
 
@@ -2216,7 +2211,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2240,7 +2235,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2269,7 +2264,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2294,7 +2289,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2323,27 +2318,27 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     const InternalFormat &formatInfo = GetSizedInternalFormatInfo(format);
     if (!formatInfo.compressed)
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidCompressedFormat);
+        context->validationError(GL_INVALID_ENUM, kInvalidCompressedFormat);
         return false;
     }
 
     GLuint blockSize = 0;
     if (!formatInfo.computeCompressedImageSize(gl::Extents(width, height, depth), &blockSize))
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorIntegerOverflow);
+        context->validationError(GL_INVALID_OPERATION, kIntegerOverflow);
         return false;
     }
 
     if (imageSize < 0 || static_cast<GLuint>(imageSize) != blockSize)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidCompressedImageSize);
+        context->validationError(GL_INVALID_VALUE, kInvalidCompressedImageSize);
         return false;
     }
 
@@ -2356,7 +2351,7 @@
 
     if (!data)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorPixelDataNull);
+        context->validationError(GL_INVALID_VALUE, kPixelDataNull);
         return false;
     }
 
@@ -2445,7 +2440,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     switch (primitiveMode)
@@ -2485,7 +2480,7 @@
                 buffer->isDoubleBoundForTransformFeedback())
             {
                 context->validationError(GL_INVALID_OPERATION,
-                                         kErrorDoubleBoundTransformFeedbackBuffer);
+                                         kTransformFeedbackBufferMultipleOutputs);
                 return false;
             }
         }
@@ -2495,13 +2490,13 @@
 
     if (!program)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorProgramNotBound);
+        context->validationError(GL_INVALID_OPERATION, kProgramNotBound);
         return false;
     }
 
     if (program->getTransformFeedbackVaryingCount() == 0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorNoTransformFeedbackOutputVariables);
+        context->validationError(GL_INVALID_OPERATION, kNoTransformFeedbackOutputVariables);
         return false;
     }
 
@@ -2546,7 +2541,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2561,7 +2556,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2575,7 +2570,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2593,7 +2588,7 @@
     unsigned int numParams;
     if (!context->getIndexedQueryParameterInfo(pname, &nativeType, &numParams))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidPname);
+        context->validationError(GL_INVALID_ENUM, kInvalidPname);
         return false;
     }
 
@@ -2606,7 +2601,7 @@
             if (index >= caps.maxTransformFeedbackSeparateAttributes)
             {
                 context->validationError(GL_INVALID_VALUE,
-                                         kErrorIndexExceedsMaxTransformFeedbackAttribs);
+                                         kIndexExceedsMaxTransformFeedbackAttribs);
                 return false;
             }
             break;
@@ -2616,8 +2611,7 @@
         case GL_UNIFORM_BUFFER_BINDING:
             if (index >= caps.maxUniformBufferBindings)
             {
-                context->validationError(GL_INVALID_VALUE,
-                                         kErrorIndexExceedsMaxUniformBufferBindings);
+                context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxUniformBufferBindings);
                 return false;
             }
             break;
@@ -2626,8 +2620,7 @@
         case GL_MAX_COMPUTE_WORK_GROUP_COUNT:
             if (index >= 3u)
             {
-                context->validationError(GL_INVALID_VALUE,
-                                         kErrorIndexExceedsMaxWorkgroupDimensions);
+                context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxWorkgroupDimensions);
                 return false;
             }
             break;
@@ -2637,13 +2630,13 @@
         case GL_ATOMIC_COUNTER_BUFFER_BINDING:
             if (context->getClientVersion() < ES_3_1)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorEnumRequiresGLES31);
+                context->validationError(GL_INVALID_ENUM, kEnumRequiresGLES31);
                 return false;
             }
             if (index >= caps.maxAtomicCounterBufferBindings)
             {
                 context->validationError(GL_INVALID_VALUE,
-                                         kErrorIndexExceedsMaxAtomicCounterBufferBindings);
+                                         kIndexExceedsMaxAtomicCounterBufferBindings);
                 return false;
             }
             break;
@@ -2653,7 +2646,7 @@
         case GL_SHADER_STORAGE_BUFFER_BINDING:
             if (context->getClientVersion() < ES_3_1)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorEnumRequiresGLES31);
+                context->validationError(GL_INVALID_ENUM, kEnumRequiresGLES31);
                 return false;
             }
             if (index >= caps.maxShaderStorageBufferBindings)
@@ -2671,7 +2664,7 @@
         case GL_VERTEX_BINDING_STRIDE:
             if (context->getClientVersion() < ES_3_1)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorEnumRequiresGLES31);
+                context->validationError(GL_INVALID_ENUM, kEnumRequiresGLES31);
                 return false;
             }
             if (index >= caps.maxVertexAttribBindings)
@@ -2685,12 +2678,12 @@
         case GL_SAMPLE_MASK_VALUE:
             if (context->getClientVersion() < ES_3_1)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorEnumRequiresGLES31);
+                context->validationError(GL_INVALID_ENUM, kEnumRequiresGLES31);
                 return false;
             }
             if (index >= caps.maxSampleMaskWords)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidSampleMaskNumber);
+                context->validationError(GL_INVALID_VALUE, kInvalidSampleMaskNumber);
                 return false;
             }
             break;
@@ -2702,17 +2695,17 @@
         case GL_IMAGE_BINDING_FORMAT:
             if (context->getClientVersion() < ES_3_1)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorEnumRequiresGLES31);
+                context->validationError(GL_INVALID_ENUM, kEnumRequiresGLES31);
                 return false;
             }
             if (index >= caps.maxImageUnits)
             {
-                context->validationError(GL_INVALID_VALUE, kErrorInvalidImageUnit);
+                context->validationError(GL_INVALID_VALUE, kInvalidImageUnit);
                 return false;
             }
             break;
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -2728,7 +2721,7 @@
 {
     if (context->getClientVersion() < ES_3_0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateIndexedStateQuery(context, target, index, nullptr);
@@ -2743,7 +2736,7 @@
 {
     if (context->getClientVersion() < ES_3_0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2773,7 +2766,7 @@
 {
     if (context->getClientVersion() < ES_3_0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateIndexedStateQuery(context, target, index, nullptr);
@@ -2788,7 +2781,7 @@
 {
     if (context->getClientVersion() < ES_3_0)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2823,13 +2816,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (!context->isValidBufferBinding(readTarget) || !context->isValidBufferBinding(writeTarget))
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidBufferTypes);
+        context->validationError(GL_INVALID_ENUM, kInvalidBufferTypes);
         return false;
     }
 
@@ -2854,7 +2847,7 @@
         (readBuffer->isBoundForTransformFeedbackAndOtherUse() ||
          writeBuffer->isBoundForTransformFeedbackAndOtherUse()))
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorBufferBoundForTransformFeedback);
+        context->validationError(GL_INVALID_OPERATION, kBufferBoundForTransformFeedback);
         return false;
     }
 
@@ -2869,7 +2862,7 @@
         !IsValueInRangeForNumericType<GLintptr>(readBuffer->getSize()) ||
         !IsValueInRangeForNumericType<GLintptr>(writeBuffer->getSize()))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorIntegerOverflow);
+        context->validationError(GL_INVALID_VALUE, kIntegerOverflow);
         return false;
     }
 
@@ -2894,13 +2887,13 @@
         {
             // This shold not be possible.
             UNREACHABLE();
-            context->validationError(GL_INVALID_VALUE, kErrorIntegerOverflow);
+            context->validationError(GL_INVALID_VALUE, kIntegerOverflow);
             return false;
         }
 
         if (checkedOffsetDiff.ValueOrDie() < size)
         {
-            context->validationError(GL_INVALID_VALUE, kErrorCopyAlias);
+            context->validationError(GL_INVALID_VALUE, kCopyAlias);
             return false;
         }
     }
@@ -2912,7 +2905,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2930,7 +2923,7 @@
         case GL_REQUESTABLE_EXTENSIONS_ANGLE:
             if (!context->getExtensions().requestExtension)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorInvalidName);
+                context->validationError(GL_INVALID_ENUM, kInvalidName);
                 return false;
             }
             if (index >= context->getRequestableExtensionStringCount())
@@ -2943,7 +2936,7 @@
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorInvalidName);
+            context->validationError(GL_INVALID_ENUM, kInvalidName);
             return false;
     }
 
@@ -2959,7 +2952,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -2978,7 +2971,7 @@
         if ((samples > 0 && context->getClientVersion() == ES_3_0) ||
             static_cast<GLuint>(samples) > context->getCaps().maxIntegerSamples)
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorSamplesOutOfRange);
+            context->validationError(GL_INVALID_OPERATION, kSamplesOutOfRange);
             return false;
         }
     }
@@ -2987,7 +2980,7 @@
     const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat);
     if (static_cast<GLuint>(samples) > formatCaps.getMaxSamples())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorSamplesOutOfRange);
+        context->validationError(GL_INVALID_OPERATION, kSamplesOutOfRange);
         return false;
     }
 
@@ -3003,7 +2996,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3014,7 +3007,7 @@
 
     if (stride < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeStride);
+        context->validationError(GL_INVALID_VALUE, kNegativeStride);
         return false;
     }
 
@@ -3072,13 +3065,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (bufSize < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeBufferSize);
+        context->validationError(GL_INVALID_VALUE, kNegativeBufferSize);
         return false;
     }
 
@@ -3098,7 +3091,7 @@
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorInvalidPname);
+            context->validationError(GL_INVALID_ENUM, kInvalidPname);
             return false;
     }
 
@@ -3114,7 +3107,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3130,14 +3123,14 @@
 {
     if (!context->getExtensions().multiDraw)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorExtensionNotEnabled);
+        context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled);
         return false;
     }
     if (context->getClientMajorVersion() < 3)
     {
         if (!context->getExtensions().instancedArrays)
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorExtensionNotEnabled);
+            context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled);
             return false;
         }
         if (!ValidateDrawInstancedANGLE(context))
@@ -3166,14 +3159,14 @@
 {
     if (!context->getExtensions().multiDraw)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorExtensionNotEnabled);
+        context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled);
         return false;
     }
     if (context->getClientMajorVersion() < 3)
     {
         if (!context->getExtensions().instancedArrays)
         {
-            context->validationError(GL_INVALID_OPERATION, kErrorExtensionNotEnabled);
+            context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled);
             return false;
         }
         if (!ValidateDrawInstancedANGLE(context))
@@ -3358,7 +3351,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3423,7 +3416,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3432,7 +3425,7 @@
 
     if (!transformFeedback->isActive())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackNotActive);
+        context->validationError(GL_INVALID_OPERATION, kTransformFeedbackNotActive);
         return false;
     }
 
@@ -3447,13 +3440,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (count < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeCount);
+        context->validationError(GL_INVALID_VALUE, kNegativeCount);
         return false;
     }
 
@@ -3466,14 +3459,13 @@
             const Caps &caps = context->getCaps();
             if (static_cast<GLuint>(count) > caps.maxTransformFeedbackSeparateAttributes)
             {
-                context->validationError(GL_INVALID_VALUE,
-                                         kErrorInvalidTransformFeedbackAttribsCount);
+                context->validationError(GL_INVALID_VALUE, kInvalidTransformFeedbackAttribsCount);
                 return false;
             }
             break;
         }
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -3497,13 +3489,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (bufSize < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeBufferSize);
+        context->validationError(GL_INVALID_VALUE, kNegativeBufferSize);
         return false;
     }
 
@@ -3515,7 +3507,7 @@
 
     if (index >= static_cast<GLuint>(programObject->getTransformFeedbackVaryingCount()))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorTransformFeedbackVaryingIndexOutOfRange);
+        context->validationError(GL_INVALID_VALUE, kTransformFeedbackVaryingIndexOutOfRange);
         return false;
     }
 
@@ -3526,7 +3518,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3541,7 +3533,7 @@
             if (curTransformFeedback && curTransformFeedback->isActive() &&
                 !curTransformFeedback->isPaused())
             {
-                context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackNotPaused);
+                context->validationError(GL_INVALID_OPERATION, kTransformFeedbackNotPaused);
                 return false;
             }
 
@@ -3549,14 +3541,14 @@
             // 2.14.1)
             if (!context->isTransformFeedbackGenerated(id))
             {
-                context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackDoesNotExist);
+                context->validationError(GL_INVALID_OPERATION, kTransformFeedbackDoesNotExist);
                 return false;
             }
         }
         break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
@@ -3567,7 +3559,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3578,7 +3570,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3588,13 +3580,13 @@
     // Current transform feedback must be active and not paused in order to pause (3.0.2 pg 86)
     if (!transformFeedback->isActive())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackNotActive);
+        context->validationError(GL_INVALID_OPERATION, kTransformFeedbackNotActive);
         return false;
     }
 
     if (transformFeedback->isPaused())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackPaused);
+        context->validationError(GL_INVALID_OPERATION, kTransformFeedbackPaused);
         return false;
     }
 
@@ -3605,7 +3597,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3615,13 +3607,13 @@
     // Current transform feedback must be active and paused in order to resume (3.0.2 pg 86)
     if (!transformFeedback->isActive())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackNotActive);
+        context->validationError(GL_INVALID_OPERATION, kTransformFeedbackNotActive);
         return false;
     }
 
     if (!transformFeedback->isPaused())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorTransformFeedbackNotPaused);
+        context->validationError(GL_INVALID_OPERATION, kTransformFeedbackNotPaused);
         return false;
     }
 
@@ -3632,7 +3624,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3648,7 +3640,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3659,7 +3651,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3670,7 +3662,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3681,7 +3673,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3693,7 +3685,7 @@
 
     if (!programObject->isLinked())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorProgramNotLinked);
+        context->validationError(GL_INVALID_OPERATION, kProgramNotLinked);
         return false;
     }
 
@@ -3708,13 +3700,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (uniformCount < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeCount);
+        context->validationError(GL_INVALID_VALUE, kNegativeCount);
         return false;
     }
 
@@ -3736,13 +3728,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (uniformCount < 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorNegativeCount);
+        context->validationError(GL_INVALID_VALUE, kNegativeCount);
         return false;
     }
 
@@ -3760,7 +3752,7 @@
         case GL_UNIFORM_NAME_LENGTH:
             if (context->getExtensions().webglCompatibility)
             {
-                context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+                context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
                 return false;
             }
             break;
@@ -3772,13 +3764,13 @@
             break;
 
         default:
-            context->validationError(GL_INVALID_ENUM, kErrorEnumNotSupported);
+            context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
             return false;
     }
 
     if (uniformCount > programObject->getActiveUniformCount())
     {
-        context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxActiveUniform);
+        context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxActiveUniform);
         return false;
     }
 
@@ -3788,7 +3780,7 @@
 
         if (index >= static_cast<GLuint>(programObject->getActiveUniformCount()))
         {
-            context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxActiveUniform);
+            context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxActiveUniform);
             return false;
         }
     }
@@ -3800,7 +3792,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3831,7 +3823,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3843,7 +3835,7 @@
 
     if (uniformBlockIndex >= programObject->getActiveUniformBlockCount())
     {
-        context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxActiveUniformBlock);
+        context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxActiveUniformBlock);
         return false;
     }
 
@@ -3857,13 +3849,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (uniformBlockBinding >= context->getCaps().maxUniformBufferBindings)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxUniformBufferBindings);
+        context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxUniformBufferBindings);
         return false;
     }
 
@@ -3876,7 +3868,7 @@
     // if never linked, there won't be any uniform blocks
     if (uniformBlockIndex >= programObject->getActiveUniformBlockCount())
     {
-        context->validationError(GL_INVALID_VALUE, kErrorIndexExceedsMaxUniformBufferBindings);
+        context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxUniformBufferBindings);
         return false;
     }
 
@@ -3891,7 +3883,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3902,19 +3894,19 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (condition != GL_SYNC_GPU_COMMANDS_COMPLETE)
     {
-        context->validationError(GL_INVALID_ENUM, kErrorInvalidFenceCondition);
+        context->validationError(GL_INVALID_ENUM, kInvalidFenceCondition);
         return false;
     }
 
     if (flags != 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidFlags);
+        context->validationError(GL_INVALID_VALUE, kInvalidFlags);
         return false;
     }
 
@@ -3925,7 +3917,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -3936,13 +3928,13 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (sync != static_cast<GLsync>(0) && !context->getSync(sync))
     {
-        context->validationError(GL_INVALID_VALUE, kErrorSyncMissing);
+        context->validationError(GL_INVALID_VALUE, kSyncMissing);
         return false;
     }
 
@@ -3953,20 +3945,20 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if ((flags & ~(GL_SYNC_FLUSH_COMMANDS_BIT)) != 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidFlags);
+        context->validationError(GL_INVALID_VALUE, kInvalidFlags);
         return false;
     }
 
     Sync *clientWaitSync = context->getSync(sync);
     if (!clientWaitSync)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorSyncMissing);
+        context->validationError(GL_INVALID_VALUE, kSyncMissing);
         return false;
     }
 
@@ -3977,26 +3969,26 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (flags != 0)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidFlags);
+        context->validationError(GL_INVALID_VALUE, kInvalidFlags);
         return false;
     }
 
     if (timeout != GL_TIMEOUT_IGNORED)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidTimeout);
+        context->validationError(GL_INVALID_VALUE, kInvalidTimeout);
         return false;
     }
 
     Sync *waitSync = context->getSync(sync);
     if (!waitSync)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorSyncMissing);
+        context->validationError(GL_INVALID_VALUE, kSyncMissing);
         return false;
     }
 
@@ -4007,7 +3999,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -4025,7 +4017,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -4036,19 +4028,19 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
     if (sampler != 0 && !context->isSampler(sampler))
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorInvalidSampler);
+        context->validationError(GL_INVALID_OPERATION, kInvalidSampler);
         return false;
     }
 
     if (unit >= context->getCaps().maxCombinedTextureImageUnits)
     {
-        context->validationError(GL_INVALID_VALUE, kErrorInvalidCombinedImageUnit);
+        context->validationError(GL_INVALID_VALUE, kInvalidCombinedImageUnit);
         return false;
     }
 
@@ -4059,7 +4051,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -4075,7 +4067,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -4098,7 +4090,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
 
@@ -4136,7 +4128,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
@@ -4149,7 +4141,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
@@ -4185,7 +4177,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateSamplerParameterBase(context, sampler, pname, -1, true, params);
@@ -4198,7 +4190,7 @@
 {
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     return ValidateSamplerParameterBase(context, sampler, pname, -1, true, params);
@@ -4233,12 +4225,12 @@
 {
     if (!context->getExtensions().blendFuncExtended)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorExtensionNotEnabled);
+        context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled);
         return false;
     }
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     if (index < 0 || index > 1)
@@ -4246,7 +4238,7 @@
         // This error is not explicitly specified but the spec does say that "<index> may be zero or
         // one to specify that the color be used as either the first or second color input to the
         // blend equation, respectively"
-        context->validationError(GL_INVALID_VALUE, kErrorFragDataBindingIndexOutOfRange);
+        context->validationError(GL_INVALID_VALUE, kFragDataBindingIndexOutOfRange);
         return false;
     }
     if (index == 1)
@@ -4254,7 +4246,7 @@
         if (colorNumber >= context->getExtensions().maxDualSourceDrawBuffers)
         {
             context->validationError(GL_INVALID_VALUE,
-                                     kErrorColorNumberGreaterThanMaxDualSourceDrawBuffers);
+                                     kColorNumberGreaterThanMaxDualSourceDrawBuffers);
             return false;
         }
     }
@@ -4262,7 +4254,7 @@
     {
         if (colorNumber >= context->getCaps().maxDrawBuffers)
         {
-            context->validationError(GL_INVALID_VALUE, kErrorColorNumberGreaterThanMaxDrawBuffers);
+            context->validationError(GL_INVALID_VALUE, kColorNumberGreaterThanMaxDrawBuffers);
             return false;
         }
     }
@@ -4286,12 +4278,12 @@
 {
     if (!context->getExtensions().blendFuncExtended)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorExtensionNotEnabled);
+        context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled);
         return false;
     }
     if (context->getClientMajorVersion() < 3)
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorES3Required);
+        context->validationError(GL_INVALID_OPERATION, kES3Required);
         return false;
     }
     Program *programObject = GetValidProgram(context, program);
@@ -4301,7 +4293,7 @@
     }
     if (!programObject->isLinked())
     {
-        context->validationError(GL_INVALID_OPERATION, kErrorProgramNotLinked);
+        context->validationError(GL_INVALID_OPERATION, kProgramNotLinked);
         return false;
     }
     return true;
@@ -4317,8 +4309,7 @@
 {
     if (!context->getExtensions().textureMultisample)
     {
-        context->validationError(GL_INVALID_OPERATION,
-                                 kErrorMultisampleTextureExtensionOrES31Required);
+        context->validationError(GL_INVALID_OPERATION, kMultisampleTextureExtensionOrES31Required);
         return false;
     }
 
@@ -4334,8 +4325,7 @@
 {
     if (!context->getExtensions().textureMultisample)
     {
-        context->validationError(GL_INVALID_OPERATION,
-                                 kErrorMultisampleTextureExtensionOrES31Required);
+        context->validationError(GL_INVALID_OPERATION, kMultisampleTextureExtensionOrES31Required);
         return false;
     }
 
@@ -4350,8 +4340,7 @@
 {
     if (!context->getExtensions().textureMultisample)
     {
-        context->validationError(GL_INVALID_OPERATION,
-                                 kErrorMultisampleTextureExtensionOrES31Required);
+        context->validationError(GL_INVALID_OPERATION, kMultisampleTextureExtensionOrES31Required);
         return false;
     }