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

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: 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 796b2870ed189c9af5c2a68593afaa4d23860b21..78fcfd3f780c9893280388dfa3774d07f2b124cf 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -561,11 +561,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) {
Ken Russell (switch to Gerrit) 2016/09/23 19:25:15 Could you explain this check? I thought we were go
Zhenyao Mo 2016/09/23 20:09:10 The filter check is done in the above (line 555-55
+ // 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.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