summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-11-17 02:22:21 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-17 03:15:08 +0100
commit1c8a3d8d2916e8d43808c9b4e75c756f162890e8 (patch)
treebbfd78bfaf425830a81d23d14f9f006d92141160
parentTextureCache: OGL query device memory if possible. (diff)
downloadyuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.tar
yuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.tar.gz
yuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.tar.bz2
yuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.tar.lz
yuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.tar.xz
yuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.tar.zst
yuzu-1c8a3d8d2916e8d43808c9b4e75c756f162890e8.zip
-rw-r--r--src/video_core/textures/texture.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp
index ba066f98f..06954963d 100644
--- a/src/video_core/textures/texture.cpp
+++ b/src/video_core/textures/texture.cpp
@@ -66,15 +66,14 @@ float TSCEntry::MaxAnisotropy() const noexcept {
return 1.0f;
}
const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue();
- u32 new_max_anisotropic{};
+ u32 added_anisotropic{};
if (anisotropic_settings == 0) {
- const auto anisotropic_based_onscale = Settings::values.resolution_info.up_scale >>
- Settings::values.resolution_info.down_shift;
- new_max_anisotropic = std::max(anisotropic_based_onscale + 1U, 1U);
+ added_anisotropic = Settings::values.resolution_info.up_scale >>
+ Settings::values.resolution_info.down_shift;
} else {
- new_max_anisotropic = Settings::values.max_anisotropy.GetValue();
+ added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U;
}
- return static_cast<float>(1U << std::min(max_anisotropy + anisotropic_settings - 1, 31U));
+ return static_cast<float>(1U << (max_anisotropy + added_anisotropic));
}
} // namespace Tegra::Texture