Implement robust the GetIntegeri_v entry point.
BUG=angleproject:1354
Change-Id: I408d0e78064aa4e493d6ca66565384ac585040e1
Reviewed-on: https://chromium-review.googlesource.com/401400
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 1581b75..2f93651 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -1930,6 +1930,37 @@
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())