diff options
| author | bunnei <bunneidev@gmail.com> | 2020-02-03 16:56:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-03 16:56:25 -0500 |
| commit | c31ec00d676f6dda0bebee70d7a0b230e5babee9 (patch) | |
| tree | 52c674cace5652f5d359dedd02ee01f911559192 /src/video_core/buffer_cache/buffer_cache.h | |
| parent | 2cd51fc9fd11cce6aeea44dc0158f6bfde5456ec (diff) | |
| parent | d027850f333611f8195a69431f34798c85ba264c (diff) | |
Merge pull request #3337 from ReinUsesLisp/vulkan-staged
yuzu: Implement Vulkan frontend
Diffstat (limited to 'src/video_core/buffer_cache/buffer_cache.h')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 0510ed777..186aca61d 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -101,7 +101,10 @@ public: void TickFrame() { ++epoch; while (!pending_destruction.empty()) { - if (pending_destruction.front()->GetEpoch() + 1 > epoch) { + // Delay at least 4 frames before destruction. + // This is due to triple buffering happening on some drivers. + static constexpr u64 epochs_to_destroy = 5; + if (pending_destruction.front()->GetEpoch() + epochs_to_destroy > epoch) { break; } pending_destruction.pop_front(); |
