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

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

Issue 2301823003: [Command Buffer] We may need to adjust texture format when clear texture level by tex{Sub}Image (Closed)
Patch Set: copy-texture-image-luma-format.html still fails in Windows Created 4 years, 3 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
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 48b41c05511206835d60362f56dad766953c9844..48c1438da3164a5e64f5957d036e9488d57dbd76 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -1447,8 +1447,9 @@ bool Texture::ClearLevel(
// For 3D textures, we always clear the entire texture.
DCHECK(info.cleared_rect == gfx::Rect());
bool cleared = decoder->ClearLevel3D(
- this, info.target, info.level, info.format, info.type,
- info.width, info.height, info.depth);
+ this, info.target, info.level,
+ TextureManager::AdjustTexFormat(decoder->GetFeatureInfo(), info.format),
+ info.type, info.width, info.height, info.depth);
if (!cleared)
return false;
} else {
@@ -1486,8 +1487,10 @@ bool Texture::ClearLevel(
// but only the decoder knows all the state (like unpack_alignment_)
// that's needed to be able to call GL correctly.
bool cleared = decoder->ClearLevel(
- this, info.target, info.level, info.format, info.type,
- rect.x(), rect.y(), rect.width(), rect.height());
+ this, info.target, info.level,
+ TextureManager::AdjustTexFormat(decoder->GetFeatureInfo(),
+ info.format),
+ info.type, rect.x(), rect.y(), rect.width(), rect.height());
if (!cleared)
return false;
}
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager_unittest.cc ('k') | gpu/command_buffer/service/texture_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698