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

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

Issue 2363773007: Command buffer should not report depth_texture on pure ES3 without depth_texture extension. (Closed)
Patch Set: fix unittests 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 28fe173afbc686390b019bdc9a99527e8706ae43..54b2eafdcde9d4cdf75ca64988c4df0ee714b332 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -581,11 +581,17 @@ bool Texture::CanRenderWithSampler(const FeatureInfo* feature_info,
const Texture::LevelInfo& first_level =
face_infos_[0].level_infos[base_level_];
if ((GLES2Util::GetChannelsForFormat(first_level.internal_format) &
- (GLES2Util::kDepth | GLES2Util::kStencil)) != 0 ||
- feature_info->validators()->compressed_texture_format.IsValid(
- first_level.internal_format)) {
- // TODO(zmo): The assumption that depth/stencil textures and compressed
- // textures are all filterable may not be true in the future.
+ (GLES2Util::kDepth | GLES2Util::kStencil)) != 0) {
+ if (sampler_state.compare_mode == GL_NONE) {
+ // In ES2 with OES_depth_texture, such limitation isn't specified.
+ if (feature_info->IsES3Enabled()) {
+ return false;
+ }
+ }
+ } else if (feature_info->validators()->compressed_texture_format.IsValid(
+ first_level.internal_format)) {
+ // TODO(zmo): The assumption that compressed textures are all filterable
+ // may not be true in the future.
} else {
if (!Texture::TextureFilterable(feature_info,
first_level.internal_format,
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698