OLD | NEW |
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 // Detects if there are uniforms of the same name but different type | 189 // Detects if there are uniforms of the same name but different type |
190 // or precision in vertex/fragment shaders. | 190 // or precision in vertex/fragment shaders. |
191 // Return true if such cases are detected. | 191 // Return true if such cases are detected. |
192 bool DetectUniformsMismatch() const; | 192 bool DetectUniformsMismatch() const; |
193 | 193 |
194 // Return true if a varying is statically used in fragment shader, but it | 194 // Return true if a varying is statically used in fragment shader, but it |
195 // is not declared in vertex shader. | 195 // is not declared in vertex shader. |
196 bool DetectVaryingsMismatch() const; | 196 bool DetectVaryingsMismatch() const; |
197 | 197 |
| 198 // Return true if a varying or an attribute share the same name. |
| 199 bool DetectGlobalNameConflicts() const; |
| 200 |
198 // Return false if varyings can't be packed into the max available | 201 // Return false if varyings can't be packed into the max available |
199 // varying registers. | 202 // varying registers. |
200 bool CheckVaryingsPacking() const; | 203 bool CheckVaryingsPacking() const; |
201 | 204 |
202 // Visible for testing | 205 // Visible for testing |
203 const LocationMap& bind_attrib_location_map() const { | 206 const LocationMap& bind_attrib_location_map() const { |
204 return bind_attrib_location_map_; | 207 return bind_attrib_location_map_; |
205 } | 208 } |
206 | 209 |
207 private: | 210 private: |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 412 |
410 uint32 max_varying_vectors_; | 413 uint32 max_varying_vectors_; |
411 | 414 |
412 DISALLOW_COPY_AND_ASSIGN(ProgramManager); | 415 DISALLOW_COPY_AND_ASSIGN(ProgramManager); |
413 }; | 416 }; |
414 | 417 |
415 } // namespace gles2 | 418 } // namespace gles2 |
416 } // namespace gpu | 419 } // namespace gpu |
417 | 420 |
418 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 421 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
OLD | NEW |