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

Unified Diff: gpu/command_buffer/service/program_manager.h

Issue 9570023: Fails glLinkProgram if two glBindAttribLocation conflicts. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/program_manager.h
===================================================================
--- gpu/command_buffer/service/program_manager.h (revision 123809)
+++ gpu/command_buffer/service/program_manager.h (working copy)
@@ -153,6 +153,17 @@
return use_count_ != 0;
}
+ // Sets attribute-location binding from a glBindAttribLocation() call.
+ void SetAttribLocationBinding(const std::string& attrib,
+ GLint location) {
+ bind_attrib_location_map_[attrib] = location;
+ }
+
+ // Detects if there are attribute location conflicts from
+ // glBindAttribLocation() calls.
+ // We only consider the declared attributes in the program.
+ bool DetectAttribLocationBindingConflicts() const;
+
static inline GLint GetFakeLocation(
GLint fake_base_location, GLint element_index) {
return fake_base_location | element_index << 16;
@@ -247,6 +258,9 @@
// Log info
scoped_ptr<std::string> log_info_;
+
+ // attribute-location binding map from glBindAttribLocation() calls.
+ std::map<std::string, GLint> bind_attrib_location_map_;
};
ProgramManager();

Powered by Google App Engine
This is Rietveld 408576698