diff --git a/include/platform/FrontendFeatures.h b/include/platform/FrontendFeatures.h index f48ea7581..e99a164ab 100644 --- a/include/platform/FrontendFeatures.h +++ b/include/platform/FrontendFeatures.h @@ -54,6 +54,12 @@ struct FrontendFeatures : angle::FeatureSetBase angle::Feature disableProgramBinary = { "disable_program_binary", angle::FeatureCategory::FrontendFeatures, "Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"}; + + // Allow disabling of GL_EXT_texture_filter_anisotropic through a runtime feature for + // performance comparisons. + angle::Feature disableAnisotropicFiltering = { + "disable_anisotropic_filtering", angle::FeatureCategory::FrontendWorkarounds, + "Disable support for anisotropic filtering", &members}; }; inline FrontendFeatures::FrontendFeatures() = default; diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp index fde04d1c6..09737198a 100644 --- a/src/libANGLE/Context.cpp +++ b/src/libANGLE/Context.cpp @@ -3209,6 +3209,11 @@ Extensions Context::generateSupportedExtensions() const supportedExtensions.colorBufferFloatRGBA = false; } + if (getFrontendFeatures().disableAnisotropicFiltering.enabled) + { + supportedExtensions.textureFilterAnisotropic = false; + } + // Some extensions are always available because they are implemented in the GL layer. supportedExtensions.bindUniformLocation = true; supportedExtensions.vertexArrayObjectOES = true;