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

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

Issue 10441087: Plum through ANGLE_depth_texture (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 e97514d403e2c6372162da5dfc270ece99f8b46a..966659753348643a5e6bf5760a7dcad49afbf064 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -210,7 +210,13 @@ bool TextureManager::TextureInfo::CanGenerateMipmaps(
return false;
}
+ // Can't generate mips for depth or stencil textures.
const TextureInfo::LevelInfo& first = level_infos_[0][0];
+ uint32 channels = GLES2Util::GetChannelsForFormat(first.format);
+ if (channels & (GLES2Util::kDepth | GLES2Util::kStencil)) {
+ return false;
+ }
+
// TODO(gman): Check internal_format, format and type.
for (size_t ii = 0; ii < level_infos_.size(); ++ii) {
const LevelInfo& info = level_infos_[ii][0];

Powered by Google App Engine
This is Rietveld 408576698