Code refactoring in validation part.
Some code refactoring in this change:
1) It moves some public methods to static.
These methods are only used in validationES3.cpp. They are not necessay to be
exposed to public.
2) The error messages to check context version are inconsistent. It makes them
to be consistent.
BUG:angleproject:2005
Change-Id: I5af4c3300634ccc44aac386c90dcb0522acbff83
Reviewed-on: https://chromium-review.googlesource.com/661324
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 7bf6506..0ab1a8e 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -4101,7 +4101,7 @@
case GL_COMPUTE_SHADER:
if (context->getClientVersion() < Version(3, 1))
{
- context->handleError(InvalidEnum() << "GL_COMPUTE_SHADER requires OpenGL ES 3.1.");
+ ANGLE_VALIDATION_ERR(context, InvalidEnum(), ES31Required);
return false;
}
break;