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 c55d9e387b11b81eb2f4448a4670fde2cade8a66..6beca1018c703b442ff6e08f71d84282563ccaab 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -4860,7 +4860,13 @@ void GLES2DecoderImpl::DoBindAttribLocation( |
if (!program) { |
return; |
} |
+ // At this point, the program's shaders may not be translated yet, |
+ // therefore, we may not find the hashed attribute name. |
+ // glBindAttribLocation call with original name is useless. |
+ // So instead, we should simply cache the binding, and then call |
+ // Program::ExecuteBindAttribLocationCalls() right before link. |
program->SetAttribLocationBinding(name, static_cast<GLint>(index)); |
+ // TODO(zmo): Get rid of the following glBindAttribLocation call. |
Zhenyao Mo
2014/10/11 00:25:41
I didn't do this in this CL, but simply add a TODO
|
glBindAttribLocation(program->service_id(), index, name); |
} |