Chromium Code Reviews| 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, |