diff options
author | bohu <bohu@google.com> | 2016-02-25 15:07:31 -0800 |
---|---|---|
committer | bohu <bohu@google.com> | 2016-02-25 15:11:50 -0800 |
commit | 276fa6bd1d188bd606c7f006ff5fa30710b7b19d (patch) | |
tree | 60c6b76f708a529ae083ba979a40cae3e18df817 /opengl | |
parent | 2d354db5299a0d4c1f61abd06202ec180a95276a (diff) | |
download | android_device_generic_goldfish-276fa6bd1d188bd606c7f006ff5fa30710b7b19d.tar.gz android_device_generic_goldfish-276fa6bd1d188bd606c7f006ff5fa30710b7b19d.tar.bz2 android_device_generic_goldfish-276fa6bd1d188bd606c7f006ff5fa30710b7b19d.zip |
Revert "Fix glActiveTexture invalid parameter bug"
This reverts commit ac3f6d133db03e03dbbd15754d0d342748a81967.
Because somehow, the init is not called and the check failed
everytime.
bug: 27324004
Change-Id: Id667926cf40e94ea666fbec534a4b54277657aea
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/shared/OpenglCodecCommon/GLClientState.cpp | 9 | ||||
-rw-r--r-- | opengl/shared/OpenglCodecCommon/GLClientState.h | 3 | ||||
-rw-r--r-- | opengl/system/GLESv1/gl.cpp | 1 | ||||
-rw-r--r-- | opengl/system/GLESv1_enc/GLEncoder.cpp | 9 | ||||
-rw-r--r-- | opengl/system/GLESv1_enc/GLEncoder.h | 1 | ||||
-rw-r--r-- | opengl/system/GLESv2/gl2.cpp | 1 | ||||
-rwxr-xr-x | opengl/system/GLESv2_enc/GL2Encoder.cpp | 9 | ||||
-rw-r--r-- | opengl/system/GLESv2_enc/GL2Encoder.h | 1 |
8 files changed, 1 insertions, 33 deletions
diff --git a/opengl/shared/OpenglCodecCommon/GLClientState.cpp b/opengl/shared/OpenglCodecCommon/GLClientState.cpp index c824396..57637ae 100644 --- a/opengl/shared/OpenglCodecCommon/GLClientState.cpp +++ b/opengl/shared/OpenglCodecCommon/GLClientState.cpp @@ -65,8 +65,6 @@ GLClientState::GLClientState(int nLocations) m_tex.textures = NULL; m_tex.numTextures = 0; m_tex.allocTextures = 0; - - m_num_texture_units = 0; } GLClientState::~GLClientState() @@ -245,15 +243,10 @@ size_t GLClientState::pixelDataSize(GLsizei width, GLsizei height, GLenum format return aligned_linesize * height; } -void GLClientState::setNumTexture(GLint num) -{ - m_num_texture_units = (num>MAX_TEXTURE_UNITS) ? MAX_TEXTURE_UNITS : num; -} - GLenum GLClientState::setActiveTextureUnit(GLenum texture) { GLuint unit = texture - GL_TEXTURE0; - if (unit >= m_num_texture_units) { + if (unit >= MAX_TEXTURE_UNITS) { return GL_INVALID_ENUM; } m_tex.activeUnit = &m_tex.unit[unit]; diff --git a/opengl/shared/OpenglCodecCommon/GLClientState.h b/opengl/shared/OpenglCodecCommon/GLClientState.h index 9c7cd21..09ee571 100644 --- a/opengl/shared/OpenglCodecCommon/GLClientState.h +++ b/opengl/shared/OpenglCodecCommon/GLClientState.h @@ -181,8 +181,6 @@ public: // Remove references to the to-be-deleted textures. void deleteTextures(GLsizei n, const GLuint* textures); - void setNumTexture(GLint num); - private: PixelStoreState m_pixelStore; VertexAttribState *m_states; @@ -191,7 +189,6 @@ private: GLuint m_currentIndexVbo; int m_activeTexture; GLint m_currentProgram; - GLint m_num_texture_units; bool validLocation(int location) { return (location >= 0 && location < m_nLocations); } diff --git a/opengl/system/GLESv1/gl.cpp b/opengl/system/GLESv1/gl.cpp index e8524ec..8aaf347 100644 --- a/opengl/system/GLESv1/gl.cpp +++ b/opengl/system/GLESv1/gl.cpp @@ -144,7 +144,6 @@ void init() ctx->glEGLImageTargetTexture2DOES = &glEGLImageTargetTexture2DOES; ctx->glEGLImageTargetRenderbufferStorageOES = &glEGLImageTargetRenderbufferStorageOES; ctx->glGetString = &my_glGetString; - ctx->init(ctx); } extern "C" { diff --git a/opengl/system/GLESv1_enc/GLEncoder.cpp b/opengl/system/GLESv1_enc/GLEncoder.cpp index 6e6583b..ec00fff 100644 --- a/opengl/system/GLESv1_enc/GLEncoder.cpp +++ b/opengl/system/GLESv1_enc/GLEncoder.cpp @@ -1015,15 +1015,6 @@ GLEncoder::~GLEncoder() delete [] m_compressedTextureFormats; } -void GLEncoder::init(void *self) -{ - GLEncoder* ctx = (GLEncoder*)self; - GLClientState* state = ctx->m_state; - GLint num; - ctx->m_glGetIntegerv_enc(self, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num); - state->setNumTexture(num); -} - size_t GLEncoder::pixelDataSize(GLsizei width, GLsizei height, GLenum format, GLenum type, int pack) { assert(m_state != NULL); diff --git a/opengl/system/GLESv1_enc/GLEncoder.h b/opengl/system/GLESv1_enc/GLEncoder.h index b763630..6db318f 100644 --- a/opengl/system/GLESv1_enc/GLEncoder.h +++ b/opengl/system/GLESv1_enc/GLEncoder.h @@ -41,7 +41,6 @@ public: void override2DTextureTarget(GLenum target); void restore2DTextureTarget(); - void init(void *self); private: diff --git a/opengl/system/GLESv2/gl2.cpp b/opengl/system/GLESv2/gl2.cpp index abbaaa0..5aaac5f 100644 --- a/opengl/system/GLESv2/gl2.cpp +++ b/opengl/system/GLESv2/gl2.cpp @@ -156,7 +156,6 @@ void init() ctx->glEGLImageTargetTexture2DOES = &glEGLImageTargetTexture2DOES; ctx->glEGLImageTargetRenderbufferStorageOES = &glEGLImageTargetRenderbufferStorageOES; ctx->glGetString = &my_glGetString; - ctx->init(ctx); } extern "C" { diff --git a/opengl/system/GLESv2_enc/GL2Encoder.cpp b/opengl/system/GLESv2_enc/GL2Encoder.cpp index 3acd8b8..c367385 100755 --- a/opengl/system/GLESv2_enc/GL2Encoder.cpp +++ b/opengl/system/GLESv2_enc/GL2Encoder.cpp @@ -135,15 +135,6 @@ GL2Encoder::~GL2Encoder() delete m_compressedTextureFormats; } -void GL2Encoder::init(void *self) -{ - GL2Encoder* ctx = (GL2Encoder*)self; - GLClientState* state = ctx->m_state; - GLint num; - ctx->m_glGetIntegerv_enc(self, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num); - state->setNumTexture(num); -} - GLenum GL2Encoder::s_glGetError(void * self) { GL2Encoder *ctx = (GL2Encoder *)self; diff --git a/opengl/system/GLESv2_enc/GL2Encoder.h b/opengl/system/GLESv2_enc/GL2Encoder.h index 765ec10..e37eef3 100644 --- a/opengl/system/GLESv2_enc/GL2Encoder.h +++ b/opengl/system/GLESv2_enc/GL2Encoder.h @@ -43,7 +43,6 @@ public: void override2DTextureTarget(GLenum target); void restore2DTextureTarget(); - void init(void *self); private: bool m_initialized; |