diff options
author | Bo Hu <bohu@google.com> | 2015-01-22 23:35:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-22 23:35:44 +0000 |
commit | 7d9f6e9b35c43e19b810a089557e561f5f2b63bf (patch) | |
tree | 034cee3ee6d77f67df72a47630e4f0f3f49f7880 /opengl | |
parent | 6d171076e8a5d1c6302efc48e7c558863b36a6e4 (diff) | |
parent | 3a69f40025b584bb49aa8f832816dd7c97c1377c (diff) | |
download | android_device_generic_goldfish-7d9f6e9b35c43e19b810a089557e561f5f2b63bf.tar.gz android_device_generic_goldfish-7d9f6e9b35c43e19b810a089557e561f5f2b63bf.tar.bz2 android_device_generic_goldfish-7d9f6e9b35c43e19b810a089557e561f5f2b63bf.zip |
Merge "Set proper error code for glShaderBinary function"
Diffstat (limited to 'opengl')
-rwxr-xr-x | opengl/system/GLESv2_enc/GL2Encoder.cpp | 8 | ||||
-rw-r--r-- | opengl/system/GLESv2_enc/GL2Encoder.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/opengl/system/GLESv2_enc/GL2Encoder.cpp b/opengl/system/GLESv2_enc/GL2Encoder.cpp index 90aa61d..18c796e 100755 --- a/opengl/system/GLESv2_enc/GL2Encoder.cpp +++ b/opengl/system/GLESv2_enc/GL2Encoder.cpp @@ -71,6 +71,7 @@ GL2Encoder::GL2Encoder(IOStream *stream) : gl2_encoder_context_t(stream) OVERRIDE(glGetVertexAttribfv); OVERRIDE(glGetVertexAttribPointerv); + this->glShaderBinary = &s_glShaderBinary; this->glShaderSource = &s_glShaderSource; this->glFinish = &s_glFinish; @@ -652,6 +653,13 @@ static bool replaceSamplerExternalWith2D(char* const str, ShaderData* const data return true; } +void GL2Encoder::s_glShaderBinary(void *self, GLsizei n, const GLuint *shaders, GLenum binaryformat, const void* binary, GLsizei length) +{ + GL2Encoder* ctx = (GL2Encoder*)self; + // Although it is not supported, need to set proper error code. + SET_ERROR_IF(1, GL_INVALID_ENUM); +} + void GL2Encoder::s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar * const *string, const GLint *length) { GL2Encoder* ctx = (GL2Encoder*)self; diff --git a/opengl/system/GLESv2_enc/GL2Encoder.h b/opengl/system/GLESv2_enc/GL2Encoder.h index 5f255d1..21e7932 100644 --- a/opengl/system/GLESv2_enc/GL2Encoder.h +++ b/opengl/system/GLESv2_enc/GL2Encoder.h @@ -117,6 +117,8 @@ private: glGetVertexAttribPointerv_client_proc_t m_glGetVertexAttribPointerv_enc; static void s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pname, GLvoid **pointer); + static void s_glShaderBinary(void *self, GLsizei n, const GLuint *shaders, GLenum binaryformat, const void* binary, GLsizei length); + static void s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar * const *string, const GLint *length); static void s_glFinish(void *self); |