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

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

Issue 10246004: Clear uniforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix warning Created 8 years, 8 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 | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h » ('j') | 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 4a8e7520c5e9e8f9f2dee820a9e185ec01bbedb7..cc864ab62b8bd4961fea7b9f927c3c9dae315671 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4462,7 +4462,11 @@ void GLES2DecoderImpl::DoLinkProgram(GLuint program) {
return;
}
- info->Link();
+ if (info->Link()) {
+ if (info == current_program_.get()) {
+ program_manager()->ClearUniforms(info);
+ }
+ }
};
void GLES2DecoderImpl::DoTexParameterf(
@@ -4776,10 +4780,10 @@ void GLES2DecoderImpl::DoUseProgram(GLuint program) {
program_manager()->UnuseProgram(shader_manager(), current_program_);
}
current_program_ = info;
+ glUseProgram(service_id);
if (current_program_) {
program_manager()->UseProgram(current_program_);
}
- glUseProgram(service_id);
}
GLenum GLES2DecoderImpl::GetGLError() {
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698