| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 glBindBuffer(GL_PIXEL_UNPACK_BUFFER, static_cast<GLuint>(orig_binding_)); | 101 glBindBuffer(GL_PIXEL_UNPACK_BUFFER, static_cast<GLuint>(orig_binding_)); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 GLint orig_binding_; | 106 GLint orig_binding_; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // anonymous namespace. | 109 } // anonymous namespace. |
| 110 | 110 |
| 111 FeatureInfo::FeatureFlags::FeatureFlags() | 111 FeatureInfo::FeatureFlags::FeatureFlags() {} |
| 112 : chromium_framebuffer_multisample(false), | |
| 113 chromium_sync_query(false), | |
| 114 use_core_framebuffer_multisample(false), | |
| 115 multisampled_render_to_texture(false), | |
| 116 use_img_for_multisampled_render_to_texture(false), | |
| 117 chromium_screen_space_antialiasing(false), | |
| 118 use_chromium_screen_space_antialiasing_via_shaders(false), | |
| 119 oes_standard_derivatives(false), | |
| 120 oes_egl_image_external(false), | |
| 121 nv_egl_stream_consumer_external(false), | |
| 122 oes_depth24(false), | |
| 123 oes_compressed_etc1_rgb8_texture(false), | |
| 124 packed_depth24_stencil8(false), | |
| 125 npot_ok(false), | |
| 126 enable_texture_float_linear(false), | |
| 127 enable_texture_half_float_linear(false), | |
| 128 angle_translated_shader_source(false), | |
| 129 angle_pack_reverse_row_order(false), | |
| 130 arb_texture_rectangle(false), | |
| 131 angle_instanced_arrays(false), | |
| 132 occlusion_query(false), | |
| 133 occlusion_query_boolean(false), | |
| 134 use_arb_occlusion_query2_for_occlusion_query_boolean(false), | |
| 135 use_arb_occlusion_query_for_occlusion_query_boolean(false), | |
| 136 native_vertex_array_object(false), | |
| 137 ext_texture_format_astc(false), | |
| 138 ext_texture_format_atc(false), | |
| 139 ext_texture_format_bgra8888(false), | |
| 140 ext_texture_format_dxt1(false), | |
| 141 ext_texture_format_dxt5(false), | |
| 142 enable_shader_name_hashing(false), | |
| 143 enable_samplers(false), | |
| 144 ext_draw_buffers(false), | |
| 145 nv_draw_buffers(false), | |
| 146 ext_frag_depth(false), | |
| 147 ext_shader_texture_lod(false), | |
| 148 use_async_readpixels(false), | |
| 149 map_buffer_range(false), | |
| 150 ext_discard_framebuffer(false), | |
| 151 angle_depth_texture(false), | |
| 152 is_swiftshader(false), | |
| 153 angle_texture_usage(false), | |
| 154 ext_texture_storage(false), | |
| 155 chromium_path_rendering(false), | |
| 156 chromium_framebuffer_mixed_samples(false), | |
| 157 blend_equation_advanced(false), | |
| 158 blend_equation_advanced_coherent(false), | |
| 159 ext_texture_rg(false), | |
| 160 chromium_image_ycbcr_420v(false), | |
| 161 chromium_image_ycbcr_422(false), | |
| 162 emulate_primitive_restart_fixed_index(false), | |
| 163 ext_render_buffer_format_bgra8888(false), | |
| 164 ext_multisample_compatibility(false), | |
| 165 ext_blend_func_extended(false), | |
| 166 ext_read_format_bgra(false), | |
| 167 desktop_srgb_support(false), | |
| 168 arb_es3_compatibility(false) {} | |
| 169 | 112 |
| 170 FeatureInfo::FeatureInfo() { | 113 FeatureInfo::FeatureInfo() { |
| 171 InitializeBasicState(base::CommandLine::InitializedForCurrentProcess() | 114 InitializeBasicState(base::CommandLine::InitializedForCurrentProcess() |
| 172 ? base::CommandLine::ForCurrentProcess() | 115 ? base::CommandLine::ForCurrentProcess() |
| 173 : nullptr); | 116 : nullptr); |
| 174 } | 117 } |
| 175 | 118 |
| 176 FeatureInfo::FeatureInfo( | 119 FeatureInfo::FeatureInfo( |
| 177 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds) | 120 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds) |
| 178 : workarounds_(gpu_driver_bug_workarounds) { | 121 : workarounds_(gpu_driver_bug_workarounds) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_R16F); | 225 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_R16F); |
| 283 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_RG16F); | 226 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_RG16F); |
| 284 validators_.texture_sized_color_renderable_internal_format.AddValue( | 227 validators_.texture_sized_color_renderable_internal_format.AddValue( |
| 285 GL_RGBA16F); | 228 GL_RGBA16F); |
| 286 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_R32F); | 229 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_R32F); |
| 287 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_RG32F); | 230 validators_.texture_sized_color_renderable_internal_format.AddValue(GL_RG32F); |
| 288 validators_.texture_sized_color_renderable_internal_format.AddValue( | 231 validators_.texture_sized_color_renderable_internal_format.AddValue( |
| 289 GL_RGBA32F); | 232 GL_RGBA32F); |
| 290 validators_.texture_sized_color_renderable_internal_format.AddValue( | 233 validators_.texture_sized_color_renderable_internal_format.AddValue( |
| 291 GL_R11F_G11F_B10F); | 234 GL_R11F_G11F_B10F); |
| 235 feature_flags_.enable_color_buffer_float = true; |
| 292 } | 236 } |
| 293 | 237 |
| 294 void FeatureInfo::EnableCHROMIUMColorBufferFloatRGBA() { | 238 void FeatureInfo::EnableCHROMIUMColorBufferFloatRGBA() { |
| 295 if (!feature_flags_.chromium_color_buffer_float_rgba) | 239 if (!feature_flags_.chromium_color_buffer_float_rgba) |
| 296 return; | 240 return; |
| 297 validators_.texture_internal_format.AddValue(GL_RGBA32F); | 241 validators_.texture_internal_format.AddValue(GL_RGBA32F); |
| 298 validators_.texture_sized_color_renderable_internal_format.AddValue( | 242 validators_.texture_sized_color_renderable_internal_format.AddValue( |
| 299 GL_RGBA32F); | 243 GL_RGBA32F); |
| 300 AddExtensionString("GL_CHROMIUM_color_buffer_float_rgba"); | 244 AddExtensionString("GL_CHROMIUM_color_buffer_float_rgba"); |
| 301 } | 245 } |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 if (pos == std::string::npos) { | 1536 if (pos == std::string::npos) { |
| 1593 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1537 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1594 } | 1538 } |
| 1595 } | 1539 } |
| 1596 | 1540 |
| 1597 FeatureInfo::~FeatureInfo() { | 1541 FeatureInfo::~FeatureInfo() { |
| 1598 } | 1542 } |
| 1599 | 1543 |
| 1600 } // namespace gles2 | 1544 } // namespace gles2 |
| 1601 } // namespace gpu | 1545 } // namespace gpu |
| OLD | NEW |