| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index a97879bdcc9443059501158ada04331afbb4e510..23eebecef9b4794ead34c3ac77bd982a0352b8bf 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -5239,10 +5239,20 @@ void GLES2DecoderImpl::DoBindTexture(GLenum target, GLuint client_id) {
|
| return;
|
| }
|
| LogClientServiceForInfo(texture, client_id, "glBindTexture");
|
| + glBindTexture(target, texture->service_id());
|
| if (texture->target() == 0) {
|
| texture_manager()->SetTarget(texture_ref, target);
|
| + if (!feature_info_->gl_version_info().BehavesLikeGLES() &&
|
| + feature_info_->gl_version_info().IsAtLeastGL(3, 2)) {
|
| + // In Desktop GL core profile and GL ES, depth textures are always
|
| + // sampled to the RED channel, whereas on Desktop GL compatibility
|
| + // proifle, they are sampled to RED, LUMINANCE, INTENSITY, or ALPHA
|
| + // channel, depending on the DEPTH_TEXTURE_MODE value.
|
| + // In theory we only need to apply this for depth textures, but it is
|
| + // simpler to apply to all textures.
|
| + glTexParameteri(target, GL_DEPTH_TEXTURE_MODE, GL_RED);
|
| + }
|
| }
|
| - glBindTexture(target, texture->service_id());
|
| } else {
|
| glBindTexture(target, 0);
|
| }
|
|
|