summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gles2_cmd_decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/service/gles2_cmd_decoder.cc')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 4a8e752..cc864ab 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() {