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>
This commit is contained in:
Geoff Lang 2020-06-30 17:03:56 -04:00 коммит произвёл Commit Bot
Родитель b2944fcfe0
Коммит a568b7e38f
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;