Revert "glGetProgramiv validation on the guest"
This reverts commit b2856fc5983846339c3b9147b9ac4e36dd5408d5.
Let's leave the check to the host, as the check here cannot handle the situation when a program is marked for delete but not yet deleted.
CTS regression:
dEQP-GLES2.functional.lifetime.delete_used -- program
Change-Id: Ib6dcf0c11407da06fd1b91e3cdb89ee711af481b
diff --git a/system/GLESv2_enc/GL2Encoder.cpp b/system/GLESv2_enc/GL2Encoder.cpp
index aadf544..fb9f2c8 100755
--- a/system/GLESv2_enc/GL2Encoder.cpp
+++ b/system/GLESv2_enc/GL2Encoder.cpp
@@ -99,7 +99,6 @@
OVERRIDE(glGetShaderSource);
OVERRIDE(glGetShaderInfoLog);
OVERRIDE(glGetProgramInfoLog);
- OVERRIDE(glGetProgramiv);
OVERRIDE(glGetUniformLocation);
OVERRIDE(glUseProgram);
@@ -167,6 +166,7 @@
}
return ctx->m_glGetError_enc(self);
+
}
void GL2Encoder::s_glFlush(void *self)
@@ -999,33 +999,6 @@
ctx->m_glGetProgramInfoLog_enc(self, program, bufsize, length, infolog);
}
-void GL2Encoder::s_glGetProgramiv(void *self, GLuint program, GLenum pname,
- GLint* params)
-{
- // We need to do the validation here because the spec says if an error is
- // generated, no change is made to the contents of params. Our encoder does
- // not respect this.
- GL2Encoder *ctx = (GL2Encoder*)self;
- switch (pname) {
- case GL_DELETE_STATUS:
- case GL_LINK_STATUS:
- case GL_VALIDATE_STATUS:
- case GL_INFO_LOG_LENGTH:
- case GL_ATTACHED_SHADERS:
- case GL_ACTIVE_ATTRIBUTES:
- case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH:
- case GL_ACTIVE_UNIFORMS:
- case GL_ACTIVE_UNIFORM_MAX_LENGTH:
- break;
- default:
- SET_ERROR_IF(1, GL_INVALID_ENUM);
- break;
- }
- SET_ERROR_IF(!ctx->m_shared->isObject(program), GL_INVALID_VALUE);
- SET_ERROR_IF(!ctx->m_shared->isProgram(program), GL_INVALID_OPERATION);
- ctx->m_glGetProgramiv_enc(self, program, pname, params);
-}
-
void GL2Encoder::s_glDeleteShader(void *self, GLenum shader)
{
GL2Encoder *ctx = (GL2Encoder*)self;