Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index fad05fe6ff9d4458c167d167cc854ca3fcf09400..dcf4d739423b909eb6b12ca64a5f83bdfe044b24 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -13314,6 +13314,18 @@ void GLES2DecoderImpl::DoCopyTexImage2D( |
| } else { |
| GLenum final_internal_format = TextureManager::AdjustTexInternalFormat( |
| feature_info_.get(), internal_format); |
| + if (workarounds().init_cube_map_before_copyteximage && |
| + texture->target() == GL_TEXTURE_CUBE_MAP && |
| + target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) { |
| + for (int i = 0; i < 2; ++i) { |
| + TextureManager::DoTexImageArguments args = { |
| + target, i, final_internal_format, 1, 1, 1, border, |
| + format, type, nullptr, 1, 0, |
| + TextureManager::DoTexImageArguments::kTexImage2D }; |
| + texture_manager()->WorkaroundCopyTexImageCubeMap(&texture_state_, |
| + &state_, &framebuffer_state_, texture_ref, func_name, args); |
| + } |
|
Zhenyao Mo
2016/09/28 21:14:23
This gets complicated when we also need to emulate
qiankun
2016/09/29 00:51:27
What kinds of TODO, something like to handle this
Zhenyao Mo
2016/09/29 20:30:16
What I mean is, if the src texture format is LUMIN
qiankun
2016/09/30 05:47:39
Sorry, I didn't get this. Can you explain it furth
qiankun
2016/10/11 01:56:20
Zhenyao&Ken, do I still need to add this TODO acco
|
| + } |
| // The service id and target of the texture attached to READ_FRAMEBUFFER. |
| GLuint source_texture_service_id = 0; |