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

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

Issue 2124953002: save vertex attribute divisor values for each program (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove non used code Created 4 years, 5 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.h
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
index 734e50fc03b5f8cdad588617af8b141725d7d5f4..c7fe059e910a581f117900d2a7580f68f243e737 100644
--- a/gpu/command_buffer/service/program_manager.h
+++ b/gpu/command_buffer/service/program_manager.h
@@ -200,6 +200,19 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
return NULL;
}
+ GLuint GetAttribDivisorByLocation(GLuint location) const {
+ if (location < attrib_location_to_divisor_map_.size()) {
+ return attrib_location_to_divisor_map_[location];
+ }
+ return 0;
+ }
+
+ void SaveAttribDivisor(GLuint location, GLuint divisor) {
+ if (location < attrib_location_to_divisor_map_.size()) {
+ attrib_location_to_divisor_map_[location] = divisor;
+ }
+ }
+
const UniformInfo* GetUniformInfo(GLint index) const;
// If the original name is not found, return NULL.
@@ -475,6 +488,9 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
// Attrib by location to index.
std::vector<GLint> attrib_location_to_index_map_;
+ // Attrib by location to divisor value.
+ std::vector<GLuint> attrib_location_to_divisor_map_;
+
GLsizei max_uniform_name_length_;
// Uniform info by index.
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698