Chromium Code Reviews| 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..01995e28f8d8025b29359312fd925064bc18f09b 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -5239,10 +5239,15 @@ 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()) { |
| + // We only need to do it for DEPTH textures on GL with compatibility |
| + // profile, but this is simpler. |
| + glTexParameteri(target, GL_DEPTH_TEXTURE_MODE, GL_RED); |
| + } |
|
piman
2016/05/18 21:00:15
Can you explain to me why this is needed and what
|
| } |
| - glBindTexture(target, texture->service_id()); |
| } else { |
| glBindTexture(target, 0); |
| } |