Chromium Code Reviews| Index: gpu/command_buffer/service/texture_manager.cc |
| diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc |
| index 3a655827f75efa7ac3312f866295dc400fda5642..38a6918c7dbfc5fc9d68cfd53fc6729abb76613e 100644 |
| --- a/gpu/command_buffer/service/texture_manager.cc |
| +++ b/gpu/command_buffer/service/texture_manager.cc |
| @@ -3261,12 +3261,20 @@ void TextureManager::DoTexImage( |
| AdjustTexFormat(feature_info_.get(), args.format), args.type, |
| args.pixels); |
| } else { |
| + if (feature_info_->workarounds().reset_teximage2d_base_level) { |
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); |
|
Ken Russell (switch to Gerrit)
2017/04/28 19:04:25
Does this have the correct effect in all cases? Th
yizhou.jiang
2017/06/09 07:58:16
No, I have only investigated GL_TEXTURE_2D, I will
|
| + } |
| glTexImage2D( |
| args.target, args.level, |
| AdjustTexInternalFormat(feature_info_.get(), args.internal_format), |
| args.width, args.height, args.border, |
| AdjustTexFormat(feature_info_.get(), args.format), args.type, |
| args.pixels); |
| + if (feature_info_->workarounds().reset_teximage2d_base_level) { |
| + Texture* texture = texture_ref->texture(); |
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, |
| + texture->base_level()); |
| + } |
| } |
| } |
| GLenum error = ERRORSTATE_PEEK_GL_ERROR(error_state, function_name); |