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

Side by Side Diff: gpu/command_buffer/service/program_manager.h

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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 const AttribInfoVector& GetAttribInfos() const { 109 const AttribInfoVector& GetAttribInfos() const {
110 return attrib_infos_; 110 return attrib_infos_;
111 } 111 }
112 112
113 const VertexAttrib* GetAttribInfo(GLint index) const { 113 const VertexAttrib* GetAttribInfo(GLint index) const {
114 return (static_cast<size_t>(index) < attrib_infos_.size()) ? 114 return (static_cast<size_t>(index) < attrib_infos_.size()) ?
115 &attrib_infos_[index] : NULL; 115 &attrib_infos_[index] : NULL;
116 } 116 }
117 117
118 GLint GetAttribLocation(const std::string& name) const; 118 GLint GetAttribLocation(const std::string& original_name) const;
119 119
120 const VertexAttrib* GetAttribInfoByLocation(GLuint location) const { 120 const VertexAttrib* GetAttribInfoByLocation(GLuint location) const {
121 if (location < attrib_location_to_index_map_.size()) { 121 if (location < attrib_location_to_index_map_.size()) {
122 GLint index = attrib_location_to_index_map_[location]; 122 GLint index = attrib_location_to_index_map_[location];
123 if (index >= 0) { 123 if (index >= 0) {
124 return &attrib_infos_[index]; 124 return &attrib_infos_[index];
125 } 125 }
126 } 126 }
127 return NULL; 127 return NULL;
128 } 128 }
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 434
435 uint32 max_varying_vectors_; 435 uint32 max_varying_vectors_;
436 436
437 DISALLOW_COPY_AND_ASSIGN(ProgramManager); 437 DISALLOW_COPY_AND_ASSIGN(ProgramManager);
438 }; 438 };
439 439
440 } // namespace gles2 440 } // namespace gles2
441 } // namespace gpu 441 } // namespace gpu
442 442
443 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 443 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698