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 f4b237f2fab19298388785f792df4a5fdf2eaf31..0fccbe0c849c6f9994355e18092cf73b029ea6c2 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -13302,10 +13302,16 @@ void GLES2DecoderImpl::DoCopyTexSubImage3D( |
| return; |
| } |
| + // For 3D textures, we always clear the entire texture. See the code in |
| + // TextureManager::ValidateAndDoTexSubImage for TexSubImage3D. |
| + if (!texture->IsLevelCleared(target, level)) { |
| + texture_manager()->ClearTextureLevel(this, texture_ref, target, level); |
| + DCHECK(texture->IsLevelCleared(target, level)); |
| + } |
| + |
| // TODO(yunchao): Follow-up CLs are necessary. For instance: |
| // 1. emulation of unsized formats in core profile |
| - // 2. clear the 3d textures if it is uncleared. |
| - // 3. out-of-bounds reading, etc. |
| + // 2. out-of-bounds reading, etc. |
|
Zhenyao Mo
2016/08/10 20:27:20
Can you file a bug for this? Comments in the code
|
| glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, |
| height); |