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

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: 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
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 adf0519ff20625930df637e3a224e00c117f0045..e8680bc2470d427459b0bf27dfe0fd53f4b72b33 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() {

Powered by Google App Engine
This is Rietveld 408576698