diff options
| author | 2021-06-14 11:58:36 +0200 | |
|---|---|---|
| committer | 2021-06-16 21:35:03 +0200 | |
| commit | 954ad2a61ee597b67b978b36898f008885d3adb0 (patch) | |
| tree | 4d0a3600e090c942bc3f553fdbdd7c24229a985e /src/video_core/buffer_cache | |
| parent | Reaper: Tune it up to be an smart GC. (diff) | |
| download | yuzu-954ad2a61ee597b67b978b36898f008885d3adb0.tar.gz yuzu-954ad2a61ee597b67b978b36898f008885d3adb0.tar.xz yuzu-954ad2a61ee597b67b978b36898f008885d3adb0.zip | |
Reaper: Setup settings and final tuning.
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 7 |
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 | ||
| 351 | template <class P> | 351 | template <class P> |
| 352 | void BufferCache<P>::TickFrame() { | 352 | void 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 | } |