Skip to content

Commit a568b7e

Browse files
vontureCommit Bot
authored andcommitted
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: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
1 parent b2944fc commit a568b7e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

include/platform/FrontendFeatures.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ struct FrontendFeatures : angle::FeatureSetBase
5454
angle::Feature disableProgramBinary = {
5555
"disable_program_binary", angle::FeatureCategory::FrontendFeatures,
5656
"Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"};
57+
58+
// Allow disabling of GL_EXT_texture_filter_anisotropic through a runtime feature for
59+
// performance comparisons.
60+
angle::Feature disableAnisotropicFiltering = {
61+
"disable_anisotropic_filtering", angle::FeatureCategory::FrontendWorkarounds,
62+
"Disable support for anisotropic filtering", &members};
5763
};
5864

5965
inline FrontendFeatures::FrontendFeatures() = default;

src/libANGLE/Context.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,6 +3209,11 @@ Extensions Context::generateSupportedExtensions() const
32093209
supportedExtensions.colorBufferFloatRGBA = false;
32103210
}
32113211

3212+
if (getFrontendFeatures().disableAnisotropicFiltering.enabled)
3213+
{
3214+
supportedExtensions.textureFilterAnisotropic = false;
3215+
}
3216+
32123217
// Some extensions are always available because they are implemented in the GL layer.
32133218
supportedExtensions.bindUniformLocation = true;
32143219
supportedExtensions.vertexArrayObjectOES = true;

0 commit comments

Comments
 (0)