Replace the GLVersion class with gl::Version.
Update code to use gl::Version in as many places as possible to ease ES 3.1
support.
BUG=angleproject:1588
Change-Id: I3490b53a81027cf849dac551a9cc66ce04506144
Reviewed-on: https://chromium-review.googlesource.com/404946
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 2f93651..6930b6e 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -31,7 +31,7 @@
// error instead of a GL_INVALID_ENUM error. As this validation function is only called in
// the validation codepaths for glTexImage2D/3D, we record a GL_INVALID_VALUE error.
const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat);
- if (!formatInfo.textureSupport(context->getClientMajorVersion(), context->getExtensions()))
+ if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
{
context->handleError(Error(GL_INVALID_VALUE));
return false;
@@ -184,8 +184,7 @@
return false;
}
- if (!actualFormatInfo.textureSupport(context->getClientMajorVersion(),
- context->getExtensions()))
+ if (!actualFormatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
{
context->handleError(Error(GL_INVALID_ENUM));
return false;
@@ -865,7 +864,7 @@
}
const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalformat);
- if (!formatInfo.textureSupport(context->getClientMajorVersion(), context->getExtensions()))
+ if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
{
context->handleError(Error(GL_INVALID_ENUM));
return false;
@@ -1922,7 +1921,7 @@
bool ValidateGetIntegeri_v(ValidationContext *context, GLenum target, GLuint index, GLint *data)
{
- if (!context->getGLVersion().isES3OrGreater())
+ if (context->getClientVersion() < ES_3_0)
{
context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0"));
return false;
@@ -1937,7 +1936,7 @@
GLsizei *length,
GLint *data)
{
- if (!context->getGLVersion().isES3OrGreater())
+ if (context->getClientVersion() < ES_3_0)
{
context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0"));
return false;
@@ -1963,7 +1962,7 @@
bool ValidateGetInteger64i_v(ValidationContext *context, GLenum target, GLuint index, GLint64 *data)
{
- if (!context->getGLVersion().isES3OrGreater())
+ if (context->getClientVersion() < ES_3_0)
{
context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0"));
return false;
@@ -1978,7 +1977,7 @@
GLsizei *length,
GLint64 *data)
{
- if (!context->getGLVersion().isES3OrGreater())
+ if (context->getClientVersion() < ES_3_0)
{
context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0"));
return false;