diff options
| author | 2022-12-10 20:54:45 -0500 | |
|---|---|---|
| committer | 2022-12-10 20:54:45 -0500 | |
| commit | 456322dde6682c679c377b157c77ded178367586 (patch) | |
| tree | 224d26cc6d12c62f40e9832fdd02ec1b06d98ee0 | |
| parent | Merge pull request #9417 from liamwhite/debug-assert (diff) | |
| download | yuzu-456322dde6682c679c377b157c77ded178367586.tar.gz yuzu-456322dde6682c679c377b157c77ded178367586.tar.xz yuzu-456322dde6682c679c377b157c77ded178367586.zip | |
video_core: fix off by one in anisotropic filtering amount
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/textures/texture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp index b8327c88a..26649aebf 100644 --- a/src/video_core/textures/texture.cpp +++ b/src/video_core/textures/texture.cpp | |||
| @@ -64,10 +64,11 @@ float TSCEntry::MaxAnisotropy() const noexcept { | |||
| 64 | return 1.0f; | 64 | return 1.0f; |
| 65 | } | 65 | } |
| 66 | const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue(); | 66 | const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue(); |
| 67 | u32 added_anisotropic{}; | 67 | s32 added_anisotropic{}; |
| 68 | if (anisotropic_settings == 0) { | 68 | if (anisotropic_settings == 0) { |
| 69 | added_anisotropic = Settings::values.resolution_info.up_scale >> | 69 | added_anisotropic = Settings::values.resolution_info.up_scale >> |
| 70 | Settings::values.resolution_info.down_shift; | 70 | Settings::values.resolution_info.down_shift; |
| 71 | added_anisotropic = std::max(added_anisotropic - 1, 0); | ||
| 71 | } else { | 72 | } else { |
| 72 | added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U; | 73 | added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U; |
| 73 | } | 74 | } |