Commit a568b7e3 by Geoff Lang Committed by Commit Bot

Add a frontend feature to disable anisotropic filtering.

This allows us to disable support for GL_EXT_texture_filter_anisotropic at runtime and make performance comparisons. Bug: b/167404532 Change-Id: Id80458e7f116e195366432fe73e8e776e9a3047b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278024 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent b2944fcf
...@@ -54,6 +54,12 @@ struct FrontendFeatures : angle::FeatureSetBase ...@@ -54,6 +54,12 @@ struct FrontendFeatures : angle::FeatureSetBase
angle::Feature disableProgramBinary = { angle::Feature disableProgramBinary = {
"disable_program_binary", angle::FeatureCategory::FrontendFeatures, "disable_program_binary", angle::FeatureCategory::FrontendFeatures,
"Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"}; "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; inline FrontendFeatures::FrontendFeatures() = default;
......
...@@ -3209,6 +3209,11 @@ Extensions Context::generateSupportedExtensions() const ...@@ -3209,6 +3209,11 @@ Extensions Context::generateSupportedExtensions() const
supportedExtensions.colorBufferFloatRGBA = false; supportedExtensions.colorBufferFloatRGBA = false;
} }
if (getFrontendFeatures().disableAnisotropicFiltering.enabled)
{
supportedExtensions.textureFilterAnisotropic = false;
}
// Some extensions are always available because they are implemented in the GL layer. // Some extensions are always available because they are implemented in the GL layer.
supportedExtensions.bindUniformLocation = true; supportedExtensions.bindUniformLocation = true;
supportedExtensions.vertexArrayObjectOES = true; supportedExtensions.vertexArrayObjectOES = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment