diff options
-rw-r--r-- | gpu/command_buffer/service/feature_info.cc | 7 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info_unittest.cc | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 81df6b6..9fa91b7 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -777,6 +777,13 @@ void FeatureInfo::InitializeFeatures() { } } + if (extensions.Contains("GL_EXT_blend_minmax") || + gfx::HasDesktopGLFeatures()) { + AddExtensionString("GL_EXT_blend_minmax"); + validators_.equation.AddValue(GL_MIN_EXT); + validators_.equation.AddValue(GL_MAX_EXT); + } + if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { AddExtensionString("GL_EXT_frag_depth"); feature_flags_.ext_frag_depth = true; diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index 973f2a0..81ecfe2 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -316,6 +316,8 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) { GL_DEPTH_COMPONENT32_OES)); EXPECT_FALSE(info_->validators()->texture_internal_format_storage.IsValid( GL_DEPTH24_STENCIL8_OES)); + EXPECT_FALSE(info_->validators()->equation.IsValid(GL_MIN_EXT)); + EXPECT_FALSE(info_->validators()->equation.IsValid(GL_MAX_EXT)); } TEST_F(FeatureInfoTest, InitializeWithANGLE) { @@ -952,6 +954,13 @@ TEST_F(FeatureInfoTest, InitializeVAOsWithClientSideArrays) { EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); } +TEST_F(FeatureInfoTest, InitializeEXT_blend_minmax) { + SetupInitExpectations("GL_EXT_blend_minmax"); + EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_blend_minmax")); + EXPECT_TRUE(info_->validators()->equation.IsValid(GL_MIN_EXT)); + EXPECT_TRUE(info_->validators()->equation.IsValid(GL_MAX_EXT)); +} + TEST_F(FeatureInfoTest, InitializeEXT_frag_depth) { SetupInitExpectations("GL_EXT_frag_depth"); EXPECT_TRUE(info_->feature_flags().ext_frag_depth); |