diff options
author | sievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 01:44:06 +0000 |
---|---|---|
committer | sievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 01:44:06 +0000 |
commit | 4e7b8920056148dc43d0af4f45b6498890ea2979 (patch) | |
tree | 3ace2581c488081b4272dd06f8a70633baddcc1b /gpu | |
parent | d1dbc2e35bd4b627bdb9ff370ffd4d2390d6e6c2 (diff) | |
download | chromium_src-4e7b8920056148dc43d0af4f45b6498890ea2979.zip chromium_src-4e7b8920056148dc43d0af4f45b6498890ea2979.tar.gz chromium_src-4e7b8920056148dc43d0af4f45b6498890ea2979.tar.bz2 |
Fix regression with r247334
GetLevelImage() does not handle GL_TEXTURE_CUBE_MAP.
TBR=reveman@chromium.org
Review URL: https://codereview.chromium.org/132333014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 729ab26..d836515 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -5956,15 +5956,17 @@ bool GLES2DecoderImpl::PrepareTexturesForRender() { continue; } - Texture* texture = texture_ref->texture(); - gfx::GLImage* image = texture->GetLevelImage(textarget, 0); - if (image && !texture->IsAttachedToFramebuffer()) { - ScopedGLErrorSuppressor suppressor( - "GLES2DecoderImpl::PrepareTexturesForRender", GetErrorState()); - textures_set = true; - glActiveTexture(GL_TEXTURE0 + texture_unit_index); - image->WillUseTexImage(); - continue; + if (textarget != GL_TEXTURE_CUBE_MAP) { + Texture* texture = texture_ref->texture(); + gfx::GLImage* image = texture->GetLevelImage(textarget, 0); + if (image && !texture->IsAttachedToFramebuffer()) { + ScopedGLErrorSuppressor suppressor( + "GLES2DecoderImpl::PrepareTexturesForRender", GetErrorState()); + textures_set = true; + glActiveTexture(GL_TEXTURE0 + texture_unit_index); + image->WillUseTexImage(); + continue; + } } } // else: should this be an error? @@ -5998,15 +6000,17 @@ void GLES2DecoderImpl::RestoreStateForTextures() { continue; } - Texture* texture = texture_ref->texture(); - gfx::GLImage* image = - texture->GetLevelImage(texture_unit.bind_target, 0); - if (image && !texture->IsAttachedToFramebuffer()) { - ScopedGLErrorSuppressor suppressor( - "GLES2DecoderImpl::RestoreStateForTextures", GetErrorState()); - glActiveTexture(GL_TEXTURE0 + texture_unit_index); - image->DidUseTexImage(); - continue; + if (texture_unit.bind_target != GL_TEXTURE_CUBE_MAP) { + Texture* texture = texture_ref->texture(); + gfx::GLImage* image = + texture->GetLevelImage(texture_unit.bind_target, 0); + if (image && !texture->IsAttachedToFramebuffer()) { + ScopedGLErrorSuppressor suppressor( + "GLES2DecoderImpl::RestoreStateForTextures", GetErrorState()); + glActiveTexture(GL_TEXTURE0 + texture_unit_index); + image->DidUseTexImage(); + continue; + } } } } |