Chromium Code Reviews| Index: gpu/command_buffer/service/feature_info.cc |
| diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc |
| index 396311cffb1b6690d7c84ff0a2052ebc885206e1..8425928e3e11a2ce8919e92f51551b43d6ca70a9 100644 |
| --- a/gpu/command_buffer/service/feature_info.cc |
| +++ b/gpu/command_buffer/service/feature_info.cc |
| @@ -431,7 +431,6 @@ void FeatureInfo::AddFeatures(const CommandLine& command_line) { |
| texture_format_validators_[GL_LUMINANCE].AddValue(GL_FLOAT); |
| texture_format_validators_[GL_LUMINANCE_ALPHA].AddValue(GL_FLOAT); |
| validators_.pixel_type.AddValue(GL_FLOAT); |
| - validators_.read_pixel_type.AddValue(GL_FLOAT); |
| AddExtensionString("GL_OES_texture_float"); |
| if (enable_texture_float_linear) { |
| AddExtensionString("GL_OES_texture_float_linear"); |
| @@ -445,13 +444,28 @@ void FeatureInfo::AddFeatures(const CommandLine& command_line) { |
| texture_format_validators_[GL_LUMINANCE].AddValue(GL_HALF_FLOAT_OES); |
| texture_format_validators_[GL_LUMINANCE_ALPHA].AddValue(GL_HALF_FLOAT_OES); |
| validators_.pixel_type.AddValue(GL_HALF_FLOAT_OES); |
| - validators_.read_pixel_type.AddValue(GL_HALF_FLOAT_OES); |
| AddExtensionString("GL_OES_texture_half_float"); |
| if (enable_texture_half_float_linear) { |
| AddExtensionString("GL_OES_texture_half_float_linear"); |
| } |
| } |
| + bool enable_color_buffer_half_float = false; |
| + if (extensions.Contains("GL_ARB_color_buffer_float") |
| + || extensions.Contains("GL_EXT_color_buffer_half_float")) { |
| + if (enable_texture_half_float) |
| + enable_color_buffer_half_float = true; |
| + } |
| + if (enable_color_buffer_half_float) { |
| + validators_.render_buffer_format.AddValue(GL_RGBA16F_EXT); |
| + validators_.render_buffer_format.AddValue(GL_RGB16F_EXT); |
| + validators_.frame_buffer_parameter.AddValue( |
| + GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT); |
| + validators_.read_pixel_type.AddValue(GL_HALF_FLOAT_OES); |
| + validators_.read_pixel_type.AddValue(GL_FLOAT); |
|
Ken Russell (switch to Gerrit)
2013/07/10 02:14:24
There's a general problem with this patch and the
|
| + AddExtensionString("GL_EXT_color_buffer_half_float"); |
| + } |
| + |
| // Check for multisample support |
| bool ext_has_multisample = |
| extensions.Contains("GL_EXT_framebuffer_multisample"); |