Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2232743002: Command buffer: CopyTexSubImage3D should clear the 3D texture if it is uncleared (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small revisions Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698