aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/texture_cache.h
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2023-05-24 03:58:49 +0200
committerGitHub <noreply@github.com>2023-05-24 03:58:49 +0200
commit72c3cf6b327734f13433179fb47d4435fb5b8cfb (patch)
treee18073ddf2049fb08d86a23db7445b6baacc2554 /src/video_core/texture_cache/texture_cache.h
parent7a201e92183c8cde2089932afef9933ac2a7db9c (diff)
parent4a54cea69afbc2104d5ce2ccbc1964dbe0bbde4a (diff)
Merge pull request #10422 from liamwhite/gc
video_core: tune garbage collection aggressiveness
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r--src/video_core/texture_cache/texture_cache.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 8e62a5f78c..9790949f5c 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) {