[TEST] Adjustments on memory collection

This commit is contained in:
CamilleLaVey
2026-07-27 22:39:10 -04:00
parent b9ec214553
commit a4bcb4a1e1
14 changed files with 88 additions and 309 deletions
+2 -1
View File
@@ -221,7 +221,8 @@ void TextureCache<P>::EnsureHeadroom(bool allow_download) {
if (usage <= limit) {
return;
}
ReclaimMemory(usage - limit, allow_download);
const u64 target = (limit / 100) * RECLAIM_TARGET_PERCENT;
ReclaimMemory(usage - target, allow_download);
}
template <class P>
@@ -121,6 +121,7 @@ class TextureCache : public VideoCommon::ChannelSetupCaches<TextureCacheChannelI
static constexpr u64 FALLBACK_MEMORY_BUDGET = 2_GiB;
static constexpr u32 USAGE_REFRESH_INTERVAL = 16;
static constexpr u64 RECLAIM_GUARD_FRAMES = 8;
static constexpr u64 RECLAIM_TARGET_PERCENT = 88;
using Runtime = typename P::Runtime;
using Image = typename P::Image;