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 #include "gpu/command_buffer/service/feature_info.h" | 5 #include "gpu/command_buffer/service/feature_info.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 map_buffer_range(false), | 160 map_buffer_range(false), |
161 ext_discard_framebuffer(false), | 161 ext_discard_framebuffer(false), |
162 angle_depth_texture(false), | 162 angle_depth_texture(false), |
163 is_swiftshader(false), | 163 is_swiftshader(false), |
164 angle_texture_usage(false), | 164 angle_texture_usage(false), |
165 ext_texture_storage(false), | 165 ext_texture_storage(false), |
166 chromium_path_rendering(false), | 166 chromium_path_rendering(false), |
167 blend_equation_advanced(false), | 167 blend_equation_advanced(false), |
168 blend_equation_advanced_coherent(false), | 168 blend_equation_advanced_coherent(false), |
169 ext_texture_rg(false), | 169 ext_texture_rg(false), |
| 170 chromium_image_ycbcr_422(false), |
170 enable_subscribe_uniform(false), | 171 enable_subscribe_uniform(false), |
171 emulate_primitive_restart_fixed_index(false), | 172 emulate_primitive_restart_fixed_index(false), |
172 ext_render_buffer_format_bgra8888(false) { | 173 ext_render_buffer_format_bgra8888(false) {} |
173 } | |
174 | 174 |
175 FeatureInfo::Workarounds::Workarounds() : | 175 FeatureInfo::Workarounds::Workarounds() : |
176 #define GPU_OP(type, name) name(false), | 176 #define GPU_OP(type, name) name(false), |
177 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 177 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
178 #undef GPU_OP | 178 #undef GPU_OP |
179 max_texture_size(0), | 179 max_texture_size(0), |
180 max_cube_map_texture_size(0), | 180 max_cube_map_texture_size(0), |
181 max_fragment_uniform_vectors(0), | 181 max_fragment_uniform_vectors(0), |
182 max_varying_vectors(0), | 182 max_varying_vectors(0), |
183 max_vertex_uniform_vectors(0), | 183 max_vertex_uniform_vectors(0), |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 783 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
784 validators_.texture_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 784 validators_.texture_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
785 validators_.get_tex_param_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 785 validators_.get_tex_param_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
786 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_RECTANGLE_ARB); | 786 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_RECTANGLE_ARB); |
787 } | 787 } |
788 | 788 |
789 #if defined(OS_MACOSX) | 789 #if defined(OS_MACOSX) |
790 AddExtensionString("GL_CHROMIUM_iosurface"); | 790 AddExtensionString("GL_CHROMIUM_iosurface"); |
791 #endif | 791 #endif |
792 | 792 |
| 793 if (extensions.Contains("GL_APPLE_ycbcr_422")) { |
| 794 AddExtensionString("GL_CHROMIUM_ycbcr_422_image"); |
| 795 feature_flags_.chromium_image_ycbcr_422 = true; |
| 796 } |
| 797 |
793 // TODO(gman): Add support for these extensions. | 798 // TODO(gman): Add support for these extensions. |
794 // GL_OES_depth32 | 799 // GL_OES_depth32 |
795 | 800 |
796 feature_flags_.enable_texture_float_linear |= enable_texture_float_linear; | 801 feature_flags_.enable_texture_float_linear |= enable_texture_float_linear; |
797 feature_flags_.enable_texture_half_float_linear |= | 802 feature_flags_.enable_texture_half_float_linear |= |
798 enable_texture_half_float_linear; | 803 enable_texture_half_float_linear; |
799 | 804 |
800 if (extensions.Contains("GL_ANGLE_pack_reverse_row_order")) { | 805 if (extensions.Contains("GL_ANGLE_pack_reverse_row_order")) { |
801 AddExtensionString("GL_ANGLE_pack_reverse_row_order"); | 806 AddExtensionString("GL_ANGLE_pack_reverse_row_order"); |
802 feature_flags_.angle_pack_reverse_row_order = true; | 807 feature_flags_.angle_pack_reverse_row_order = true; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 if (pos == std::string::npos) { | 1160 if (pos == std::string::npos) { |
1156 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1161 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1157 } | 1162 } |
1158 } | 1163 } |
1159 | 1164 |
1160 FeatureInfo::~FeatureInfo() { | 1165 FeatureInfo::~FeatureInfo() { |
1161 } | 1166 } |
1162 | 1167 |
1163 } // namespace gles2 | 1168 } // namespace gles2 |
1164 } // namespace gpu | 1169 } // namespace gpu |
OLD | NEW |