| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Detects if there are uniforms of the same name but different type | 208 // Detects if there are uniforms of the same name but different type |
| 209 // or precision in vertex/fragment shaders. | 209 // or precision in vertex/fragment shaders. |
| 210 // Return true and set the first found conflicting hashed name to | 210 // Return true and set the first found conflicting hashed name to |
| 211 // conflicting_name if such cases are detected. | 211 // conflicting_name if such cases are detected. |
| 212 bool DetectUniformsMismatch(std::string* conflicting_name) const; | 212 bool DetectUniformsMismatch(std::string* conflicting_name) const; |
| 213 | 213 |
| 214 // Return true if a varying is statically used in fragment shader, but it | 214 // Return true if a varying is statically used in fragment shader, but it |
| 215 // is not declared in vertex shader. | 215 // is not declared in vertex shader. |
| 216 bool DetectVaryingsMismatch(std::string* conflicting_name) const; | 216 bool DetectVaryingsMismatch(std::string* conflicting_name) const; |
| 217 | 217 |
| 218 // Return true if any built-in invariant matching rules are broken as in |
| 219 // GLSL ES spec 1.00.17, section 4.6.4, Invariance and Linkage. |
| 220 bool DetectBuiltInInvariantConflicts() const; |
| 221 |
| 218 // Return true if an uniform and an attribute share the same name. | 222 // Return true if an uniform and an attribute share the same name. |
| 219 bool DetectGlobalNameConflicts(std::string* conflicting_name) const; | 223 bool DetectGlobalNameConflicts(std::string* conflicting_name) const; |
| 220 | 224 |
| 221 // Return false if varyings can't be packed into the max available | 225 // Return false if varyings can't be packed into the max available |
| 222 // varying registers. | 226 // varying registers. |
| 223 bool CheckVaryingsPacking(VaryingsPackingOption option) const; | 227 bool CheckVaryingsPacking(VaryingsPackingOption option) const; |
| 224 | 228 |
| 225 // Visible for testing | 229 // Visible for testing |
| 226 const LocationMap& bind_attrib_location_map() const { | 230 const LocationMap& bind_attrib_location_map() const { |
| 227 return bind_attrib_location_map_; | 231 return bind_attrib_location_map_; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 438 |
| 435 uint32 max_varying_vectors_; | 439 uint32 max_varying_vectors_; |
| 436 | 440 |
| 437 DISALLOW_COPY_AND_ASSIGN(ProgramManager); | 441 DISALLOW_COPY_AND_ASSIGN(ProgramManager); |
| 438 }; | 442 }; |
| 439 | 443 |
| 440 } // namespace gles2 | 444 } // namespace gles2 |
| 441 } // namespace gpu | 445 } // namespace gpu |
| 442 | 446 |
| 443 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 447 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
| OLD | NEW |