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

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

Issue 1988303002: Fix depth texture sampling on compatibility profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698