Add support for ES31 context creation
The dEQP test for context creation passes.
SH_WEBGL3_SPEC has been added, but it should be considered whether we
should keep it, remove it or rename it. It was added so that there is
a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file
has been modified so that some tokens from es3 can be also used in
es31 as well.
A separate macro ES3_1_ONLY is added so that some tokens are limited
only for es 310 shaders.
BUG=angleproject:1442
TEST=angle_unittests
Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba
Reviewed-on: https://chromium-review.googlesource.com/360300
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 9d7129b..4d2449f 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -1927,13 +1927,13 @@
GLenum type,
const GLvoid *pixels)
{
- if (context->getClientVersion() < 3)
+ if (context->getClientMajorVersion() < 3)
{
return ValidateES2TexImageParameters(context, target, level, internalformat, false, false,
0, 0, width, height, border, format, type, pixels);
}
- ASSERT(context->getClientVersion() >= 3);
+ ASSERT(context->getClientMajorVersion() >= 3);
return ValidateES3TexImage2DParameters(context, target, level, internalformat, false, false, 0,
0, 0, width, height, 1, border, format, type, pixels);
}
@@ -1950,13 +1950,13 @@
const GLvoid *pixels)
{
- if (context->getClientVersion() < 3)
+ if (context->getClientMajorVersion() < 3)
{
return ValidateES2TexImageParameters(context, target, level, GL_NONE, false, true, xoffset,
yoffset, width, height, 0, format, type, pixels);
}
- ASSERT(context->getClientVersion() >= 3);
+ ASSERT(context->getClientMajorVersion() >= 3);
return ValidateES3TexImage2DParameters(context, target, level, GL_NONE, false, true, xoffset,
yoffset, 0, width, height, 1, 0, format, type, pixels);
}
@@ -1971,7 +1971,7 @@
GLsizei imageSize,
const GLvoid *data)
{
- if (context->getClientVersion() < 3)
+ if (context->getClientMajorVersion() < 3)
{
if (!ValidateES2TexImageParameters(context, target, level, internalformat, true, false, 0,
0, width, height, border, GL_NONE, GL_NONE, data))
@@ -1981,7 +1981,7 @@
}
else
{
- ASSERT(context->getClientVersion() >= 3);
+ ASSERT(context->getClientMajorVersion() >= 3);
if (!ValidateES3TexImage2DParameters(context, target, level, internalformat, true, false, 0,
0, 0, width, height, 1, border, GL_NONE, GL_NONE,
data))
@@ -2019,7 +2019,7 @@
GLsizei imageSize,
const GLvoid *data)
{
- if (context->getClientVersion() < 3)
+ if (context->getClientMajorVersion() < 3)
{
if (!ValidateES2TexImageParameters(context, target, level, GL_NONE, true, true, xoffset,
yoffset, width, height, 0, GL_NONE, GL_NONE, data))
@@ -2029,7 +2029,7 @@
}
else
{
- ASSERT(context->getClientVersion() >= 3);
+ ASSERT(context->getClientMajorVersion() >= 3);
if (!ValidateES3TexImage2DParameters(context, target, level, GL_NONE, true, true, xoffset,
yoffset, 0, width, height, 1, 0, GL_NONE, GL_NONE,
data))
@@ -2163,7 +2163,7 @@
case GL_TEXTURE_3D:
case GL_TEXTURE_2D_ARRAY:
- if (context->getClientVersion() < 3)
+ if (context->getClientMajorVersion() < 3)
{
context->handleError(Error(GL_INVALID_ENUM, "GLES 3.0 disabled"));
return false;