Chromium Code Reviews| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 // returns false if error. | 181 // returns false if error. |
| 182 bool SetUniformLocationBinding(const std::string& name, GLint location); | 182 bool SetUniformLocationBinding(const std::string& name, GLint location); |
| 183 | 183 |
| 184 // Detects if there are attribute location conflicts from | 184 // Detects if there are attribute location conflicts from |
| 185 // glBindAttribLocation() calls. | 185 // glBindAttribLocation() calls. |
| 186 // We only consider the declared attributes in the program. | 186 // We only consider the declared attributes in the program. |
| 187 bool DetectAttribLocationBindingConflicts() const; | 187 bool DetectAttribLocationBindingConflicts() const; |
| 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 and set the first found conflicting hashed name to |
| 192 bool DetectUniformsMismatch() const; | 192 // conflicting_name if such cases are detected. |
| 193 bool DetectUniformsMismatch(std::string& conflicting_name) const; | |
|
piman
2014/01/09 18:16:46
nit: style doesn't allow non-const references, ins
| |
| 193 | 194 |
| 194 // Return true if a varying is statically used in fragment shader, but it | 195 // Return true if a varying is statically used in fragment shader, but it |
| 195 // is not declared in vertex shader. | 196 // is not declared in vertex shader. |
| 196 bool DetectVaryingsMismatch() const; | 197 bool DetectVaryingsMismatch(std::string& conflicting_name) const; |
| 197 | 198 |
| 198 // Return true if an uniform and an attribute share the same name. | 199 // Return true if an uniform and an attribute share the same name. |
| 199 bool DetectGlobalNameConflicts() const; | 200 bool DetectGlobalNameConflicts(std::string& conflicting_name) const; |
| 200 | 201 |
| 201 // Return false if varyings can't be packed into the max available | 202 // Return false if varyings can't be packed into the max available |
| 202 // varying registers. | 203 // varying registers. |
| 203 bool CheckVaryingsPacking() const; | 204 bool CheckVaryingsPacking() const; |
| 204 | 205 |
| 205 // Visible for testing | 206 // Visible for testing |
| 206 const LocationMap& bind_attrib_location_map() const { | 207 const LocationMap& bind_attrib_location_map() const { |
| 207 return bind_attrib_location_map_; | 208 return bind_attrib_location_map_; |
| 208 } | 209 } |
| 209 | 210 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 | 413 |
| 413 uint32 max_varying_vectors_; | 414 uint32 max_varying_vectors_; |
| 414 | 415 |
| 415 DISALLOW_COPY_AND_ASSIGN(ProgramManager); | 416 DISALLOW_COPY_AND_ASSIGN(ProgramManager); |
| 416 }; | 417 }; |
| 417 | 418 |
| 418 } // namespace gles2 | 419 } // namespace gles2 |
| 419 } // namespace gpu | 420 } // namespace gpu |
| 420 | 421 |
| 421 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 422 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
| OLD | NEW |