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/ContextState.cpp b/src/libANGLE/ContextState.cpp
index 18a7510..2a3b68e 100644
--- a/src/libANGLE/ContextState.cpp
+++ b/src/libANGLE/ContextState.cpp
@@ -15,15 +15,14 @@
{
ContextState::ContextState(uintptr_t contextIn,
- GLint clientMajorVersionIn,
- GLint clientMinorVersionIn,
+ const Version &clientVersion,
State *stateIn,
const Caps &capsIn,
const TextureCapsMap &textureCapsIn,
const Extensions &extensionsIn,
const ResourceManager *resourceManagerIn,
const Limitations &limitationsIn)
- : mGLVersion(clientMajorVersionIn, clientMinorVersionIn),
+ : mClientVersion(clientVersion),
mContext(contextIn),
mState(stateIn),
mCaps(capsIn),
@@ -43,8 +42,7 @@
return mTextureCaps.get(internalFormat);
}
-ValidationContext::ValidationContext(GLint clientMajorVersion,
- GLint clientMinorVersion,
+ValidationContext::ValidationContext(const Version &clientVersion,
State *state,
const Caps &caps,
const TextureCapsMap &textureCaps,
@@ -53,8 +51,7 @@
const Limitations &limitations,
bool skipValidation)
: mState(reinterpret_cast<uintptr_t>(this),
- clientMajorVersion,
- clientMinorVersion,
+ clientVersion,
state,
caps,
textureCaps,
@@ -399,9 +396,7 @@
return true;
}
- const GLVersion &glVersion = mState.getGLVersion();
-
- if (!glVersion.isES3OrGreater())
+ if (getClientVersion() < Version(3, 0))
{
return false;
}
@@ -477,7 +472,7 @@
}
}
- if (!glVersion.isES31())
+ if (getClientVersion() < Version(3, 1))
{
return false;
}
@@ -541,9 +536,7 @@
GLenum *type,
unsigned int *numParams)
{
-
- const GLVersion &glVersion = mState.getGLVersion();
- if (!glVersion.isES3OrGreater())
+ if (getClientVersion() < Version(3, 0))
{
return false;
}
@@ -568,7 +561,7 @@
}
}
- if (!glVersion.isES31())
+ if (getClientVersion() < Version(3, 1))
{
return false;
}