| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 struct UniformInfo { | 92 struct UniformInfo { |
| 93 UniformInfo(); | 93 UniformInfo(); |
| 94 UniformInfo(const UniformInfo& other); | 94 UniformInfo(const UniformInfo& other); |
| 95 UniformInfo(const std::string& client_name, | 95 UniformInfo(const std::string& client_name, |
| 96 GLint client_location_base, | 96 GLint client_location_base, |
| 97 GLenum _type, | 97 GLenum _type, |
| 98 bool _is_array, | 98 bool _is_array, |
| 99 const std::vector<GLint>& service_locations); | 99 const std::vector<GLint>& service_locations); |
| 100 ~UniformInfo(); | 100 ~UniformInfo(); |
| 101 bool IsSampler() const { | 101 bool IsSampler() const { |
| 102 return type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB || | 102 switch (type) { |
| 103 type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES; | 103 case GL_SAMPLER_2D: |
| 104 case GL_SAMPLER_2D_RECT_ARB: |
| 105 case GL_SAMPLER_CUBE: |
| 106 case GL_SAMPLER_EXTERNAL_OES: |
| 107 case GL_SAMPLER_3D: |
| 108 case GL_SAMPLER_2D_SHADOW: |
| 109 case GL_SAMPLER_2D_ARRAY: |
| 110 case GL_SAMPLER_2D_ARRAY_SHADOW: |
| 111 case GL_SAMPLER_CUBE_SHADOW: |
| 112 case GL_INT_SAMPLER_2D: |
| 113 case GL_INT_SAMPLER_3D: |
| 114 case GL_INT_SAMPLER_CUBE: |
| 115 case GL_INT_SAMPLER_2D_ARRAY: |
| 116 case GL_UNSIGNED_INT_SAMPLER_2D: |
| 117 case GL_UNSIGNED_INT_SAMPLER_3D: |
| 118 case GL_UNSIGNED_INT_SAMPLER_CUBE: |
| 119 case GL_UNSIGNED_INT_SAMPLER_2D_ARRAY: |
| 120 return true; |
| 121 default: |
| 122 return false; |
| 123 } |
| 104 } | 124 } |
| 105 | 125 |
| 106 GLsizei size; | 126 GLsizei size; |
| 107 GLenum type; | 127 GLenum type; |
| 108 uint32_t accepts_api_type; | 128 uint32_t accepts_api_type; |
| 109 GLint fake_location_base; | 129 GLint fake_location_base; |
| 110 bool is_array; | 130 bool is_array; |
| 111 std::string name; | 131 std::string name; |
| 112 std::vector<GLint> element_locations; | 132 std::vector<GLint> element_locations; |
| 113 std::vector<GLuint> texture_units; | 133 std::vector<GLuint> texture_units; |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 }; | 729 }; |
| 710 | 730 |
| 711 inline const FeatureInfo& Program::feature_info() const { | 731 inline const FeatureInfo& Program::feature_info() const { |
| 712 return *manager_->feature_info_.get(); | 732 return *manager_->feature_info_.get(); |
| 713 } | 733 } |
| 714 | 734 |
| 715 } // namespace gles2 | 735 } // namespace gles2 |
| 716 } // namespace gpu | 736 } // namespace gpu |
| 717 | 737 |
| 718 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 738 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
| OLD | NEW |