summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index b4fa85c5b..a8fb21d92 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -350,9 +350,10 @@ BufferCache<P>::BufferCache(VideoCore::RasterizerInterface& rasterizer_,
350 350
351template <class P> 351template <class P>
352void BufferCache<P>::TickFrame() { 352void BufferCache<P>::TickFrame() {
353 const bool enabled_gc = Settings::values.use_caches_gc.GetValue();
353 SCOPE_EXIT({ 354 SCOPE_EXIT({
354 ++frame_tick; 355 ++frame_tick;
355 delayed_destruction_ring.Tick(); 356 delayed_destruction_ring.Tick();
356 }); 357 });
357 // Calculate hits and shots and move hit bits to the right 358 // Calculate hits and shots and move hit bits to the right
358 const u32 hits = std::reduce(uniform_cache_hits.begin(), uniform_cache_hits.end()); 359 const u32 hits = std::reduce(uniform_cache_hits.begin(), uniform_cache_hits.end());
@@ -367,7 +368,7 @@ void BufferCache<P>::TickFrame() {
367 const bool skip_preferred = hits * 256 < shots * 251; 368 const bool skip_preferred = hits * 256 < shots * 251;
368 uniform_buffer_skip_cache_size = skip_preferred ? DEFAULT_SKIP_CACHE_SIZE : 0; 369 uniform_buffer_skip_cache_size = skip_preferred ? DEFAULT_SKIP_CACHE_SIZE : 0;
369 370
370 const bool activate_gc = total_used_memory >= expected_memory; 371 const bool activate_gc = enabled_gc && total_used_memory >= expected_memory;
371 if (!activate_gc) { 372 if (!activate_gc) {
372 return; 373 return;
373 } 374 }