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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 // Sets attribute-location binding from a glBindAttribLocation() call. | 207 // Sets attribute-location binding from a glBindAttribLocation() call. |
208 void SetAttribLocationBinding(const std::string& attrib, GLint location) { | 208 void SetAttribLocationBinding(const std::string& attrib, GLint location) { |
209 bind_attrib_location_map_[attrib] = location; | 209 bind_attrib_location_map_[attrib] = location; |
210 } | 210 } |
211 | 211 |
212 // Sets uniform-location binding from a glBindUniformLocationCHROMIUM call. | 212 // Sets uniform-location binding from a glBindUniformLocationCHROMIUM call. |
213 // returns false if error. | 213 // returns false if error. |
214 bool SetUniformLocationBinding(const std::string& name, GLint location); | 214 bool SetUniformLocationBinding(const std::string& name, GLint location); |
215 | 215 |
| 216 // Detects if the shader version combination is not valid. |
| 217 bool DetectShaderVersionMismatch() const; |
| 218 |
216 // Detects if there are attribute location conflicts from | 219 // Detects if there are attribute location conflicts from |
217 // glBindAttribLocation() calls. | 220 // glBindAttribLocation() calls. |
218 // We only consider the declared attributes in the program. | 221 // We only consider the declared attributes in the program. |
219 bool DetectAttribLocationBindingConflicts() const; | 222 bool DetectAttribLocationBindingConflicts() const; |
220 | 223 |
221 // Detects if there are uniforms of the same name but different type | 224 // Detects if there are uniforms of the same name but different type |
222 // or precision in vertex/fragment shaders. | 225 // or precision in vertex/fragment shaders. |
223 // Return true and set the first found conflicting hashed name to | 226 // Return true and set the first found conflicting hashed name to |
224 // conflicting_name if such cases are detected. | 227 // conflicting_name if such cases are detected. |
225 bool DetectUniformsMismatch(std::string* conflicting_name) const; | 228 bool DetectUniformsMismatch(std::string* conflicting_name) const; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 469 |
467 uint32 max_varying_vectors_; | 470 uint32 max_varying_vectors_; |
468 | 471 |
469 DISALLOW_COPY_AND_ASSIGN(ProgramManager); | 472 DISALLOW_COPY_AND_ASSIGN(ProgramManager); |
470 }; | 473 }; |
471 | 474 |
472 } // namespace gles2 | 475 } // namespace gles2 |
473 } // namespace gpu | 476 } // namespace gpu |
474 | 477 |
475 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 478 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
OLD | NEW |