| 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 f759bef8c188a26f710077f4d3e6cf8efed380b4..bf88c03cfccfe60f83f29644485ea1ae33dda6f9 100644
|
| --- a/gpu/command_buffer/service/feature_info.cc
|
| +++ b/gpu/command_buffer/service/feature_info.cc
|
| @@ -432,7 +432,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");
|
| @@ -446,13 +445,51 @@ 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_float = false;
|
| + if (extensions.Contains("GL_ARB_color_buffer_float")
|
| + || extensions.Contains("GL_ANGLE_color_buffer_float")) {
|
| + if (enable_texture_float)
|
| + enable_color_buffer_float = true;
|
| + }
|
| + if (enable_color_buffer_float) {
|
| + validators_.render_buffer_format.AddValue(GL_RGBA32F_EXT);
|
| + validators_.render_buffer_format.AddValue(GL_RGB32F_EXT);
|
| + AddExtensionString("GL_ANGLE_color_buffer_float");
|
| + }
|
| +
|
| + 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);
|
| + // FIXME: read_pixel_type check should be improved.
|
| + // Only two format/type combinations are supported, one is
|
| + // RGBA/UNSIGNED_BYTE or RGBA/FLOAT, another is implementation-chosen
|
| + // format and type that can be queried.
|
| + validators_.read_pixel_type.AddValue(GL_HALF_FLOAT_OES);
|
| + AddExtensionString("GL_EXT_color_buffer_half_float");
|
| + }
|
| +
|
| + if (enable_color_buffer_float || enable_color_buffer_half_float) {
|
| + validators_.frame_buffer_parameter.AddValue(
|
| + GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT);
|
| + // FIXME: read_pixel_type check should be improved.
|
| + // Only two format/type combinations are supported, one is
|
| + // RGBA/UNSIGNED_BYTE or RGBA/FLOAT, another is implementation-chosen
|
| + // format and type that can be queried.
|
| + validators_.read_pixel_type.AddValue(GL_FLOAT);
|
| + }
|
| +
|
| // Check for multisample support
|
| if (!disallowed_features_.multisampling) {
|
| bool ext_has_multisample =
|
|
|