diff options
author | Liam <byteslice@airmail.cc> | 2023-05-21 00:07:31 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-05-23 18:55:14 +0200 |
commit | 3b1172c10f9312c9a6f49f61872c75bfbe701e1b (patch) | |
tree | 913f3b014816aa983045235477df16d96eec1caf /src | |
parent | Merge pull request #10386 from german77/high (diff) | |
download | yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.tar yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.tar.gz yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.tar.bz2 yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.tar.lz yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.tar.xz yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.tar.zst yuzu-3b1172c10f9312c9a6f49f61872c75bfbe701e1b.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 4 | ||||
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 98756e4da..f3a6d5069 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -30,8 +30,8 @@ BufferCache<P>::BufferCache(VideoCore::RasterizerInterface& rasterizer_, } const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory()); - const s64 min_spacing_expected = device_memory - 1_GiB - 512_MiB; - const s64 min_spacing_critical = device_memory - 1_GiB; + const s64 min_spacing_expected = device_memory - 1_GiB; + const s64 min_spacing_critical = device_memory - 512_MiB; const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD); const s64 min_vacancy_expected = (6 * mem_threshold) / 10; const s64 min_vacancy_critical = (3 * mem_threshold) / 10; diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index b24086fce..6abafa877 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -49,8 +49,8 @@ TextureCache<P>::TextureCache(Runtime& runtime_, VideoCore::RasterizerInterface& if constexpr (HAS_DEVICE_MEMORY_INFO) { const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory()); - const s64 min_spacing_expected = device_memory - 1_GiB - 512_MiB; - const s64 min_spacing_critical = device_memory - 1_GiB; + const s64 min_spacing_expected = device_memory - 1_GiB; + const s64 min_spacing_critical = device_memory - 512_MiB; const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD); const s64 min_vacancy_expected = (6 * mem_threshold) / 10; const s64 min_vacancy_critical = (3 * mem_threshold) / 10; @@ -86,10 +86,12 @@ void TextureCache<P>::RunGarbageCollector() { // used by the async decoder thread. return false; } + if (!aggressive_mode && True(image.flags & ImageFlagBits::CostlyLoad)) { + return false; + } const bool must_download = image.IsSafeDownload() && False(image.flags & ImageFlagBits::BadOverlap); - if (!high_priority_mode && - (must_download || True(image.flags & ImageFlagBits::CostlyLoad))) { + if (!high_priority_mode && must_download) { return false; } if (must_download) { |