Commit cf255eac by Geoff Lang Committed by Commit Bot

Implement robust the GetIntegeri_v entry point.

BUG=angleproject:1354 Change-Id: I408d0e78064aa4e493d6ca66565384ac585040e1 Reviewed-on: https://chromium-review.googlesource.com/401400Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 496c02df
......@@ -1930,6 +1930,37 @@ bool ValidateGetIntegeri_v(ValidationContext *context, GLenum target, GLuint ind
return ValidateIndexedStateQuery(context, target, index, nullptr);
}
bool ValidateGetIntegeri_vRobustANGLE(ValidationContext *context,
GLenum target,
GLuint index,
GLsizei bufSize,
GLsizei *length,
GLint *data)
{
if (!context->getGLVersion().isES3OrGreater())
{
context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0"));
return false;
}
if (!ValidateRobustEntryPoint(context, bufSize))
{
return false;
}
if (!ValidateIndexedStateQuery(context, target, index, length))
{
return false;
}
if (!ValidateRobustBufferSize(context, bufSize, *length))
{
return false;
}
return true;
}
bool ValidateGetInteger64i_v(ValidationContext *context, GLenum target, GLuint index, GLint64 *data)
{
if (!context->getGLVersion().isES3OrGreater())
......
......@@ -340,6 +340,12 @@ bool ValidateIndexedStateQuery(ValidationContext *context,
GLuint index,
GLsizei *length);
bool ValidateGetIntegeri_v(ValidationContext *context, GLenum target, GLuint index, GLint *data);
bool ValidateGetIntegeri_vRobustANGLE(ValidationContext *context,
GLenum target,
GLuint index,
GLsizei bufSize,
GLsizei *length,
GLint *data);
bool ValidateGetInteger64i_v(ValidationContext *context,
GLenum target,
GLuint index,
......
......@@ -2681,7 +2681,19 @@ GetIntegeri_vRobustANGLE(GLenum target, GLuint index, GLsizei bufSize, GLsizei *
"(GLenum target = 0x%X, GLuint index = %u, GLsizei bufsize = %d, GLsizei* length = "
"0x%0.8p, GLint* data = 0x%0.8p)",
target, index, bufSize, length, data);
UNIMPLEMENTED();
Context *context = GetValidGlobalContext();
if (context)
{
GLsizei numParams = 0;
if (!ValidateGetIntegeri_vRobustANGLE(context, target, index, bufSize, &numParams, data))
{
return;
}
context->getIntegeri_v(target, index, data);
SetRobustLengthParam(length, numParams);
}
}
ANGLE_EXPORT void GL_APIENTRY GetInternalformativRobustANGLE(GLenum target,
......
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