diff options
author | Fernando S <fsahmkow27@gmail.com> | 2023-05-24 03:58:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 03:58:49 +0200 |
commit | 72a14a68177a7ecab4d36fbaf8533cf4e0d70566 (patch) | |
tree | e18073ddf2049fb08d86a23db7445b6baacc2554 /src | |
parent | Merge pull request #10417 from liamwhite/check-state (diff) | |
parent | video_core: tune garbage collection aggressiveness (diff) | |
download | yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.tar yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.tar.gz yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.tar.bz2 yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.tar.lz yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.tar.xz yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.tar.zst yuzu-72a14a68177a7ecab4d36fbaf8533cf4e0d70566.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 f2508fbf0..65494097b 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 8e62a5f78..9790949f5 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) { |