Commit 44ec2f59 by Geoff Lang Committed by Commit Bot

Fix GL_MAX_SAMPLES query for ES3 when the extension is missing.

This query was added in both ES3 and ANGLE_framebuffer_multisample but the code was never updated to accept it for an ES3 context without the extension present. Caught by the angle passthrough command decoder fuzzer. BUG=602737 Change-Id: Ic9a8c67747777ef48e1dd227110482998fee75ce Reviewed-on: https://chromium-review.googlesource.com/440651Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent c5508d6e
...@@ -250,16 +250,6 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign ...@@ -250,16 +250,6 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign
*numParams = 1; *numParams = 1;
return true; return true;
} }
case GL_MAX_SAMPLES_ANGLE:
{
if (!getExtensions().framebufferMultisample)
{
return false;
}
*type = GL_INT;
*numParams = 1;
return true;
}
case GL_MAX_VIEWPORT_DIMS: case GL_MAX_VIEWPORT_DIMS:
{ {
*type = GL_INT; *type = GL_INT;
...@@ -474,6 +464,18 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign ...@@ -474,6 +464,18 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign
*type = GL_INT; *type = GL_INT;
*numParams = 1; *numParams = 1;
return true; return true;
case GL_MAX_SAMPLES:
{
static_assert(GL_MAX_SAMPLES_ANGLE == GL_MAX_SAMPLES,
"GL_MAX_SAMPLES_ANGLE not equal to GL_MAX_SAMPLES");
if ((getClientMajorVersion() < 3) && !getExtensions().framebufferMultisample)
{
return false;
}
*type = GL_INT;
*numParams = 1;
return true;
}
} }
if (getClientVersion() < Version(3, 0)) if (getClientVersion() < Version(3, 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment