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

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

Issue 651543003: Disallow active attrib aliasing at shader program link time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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);
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager.h » ('j') | gpu/command_buffer/service/program_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698