aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_cache.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-02-03 16:56:25 -0500
committerGitHub <noreply@github.com>2020-02-03 16:56:25 -0500
commitd02c1c1f75bd33958247591cad3aec204f56799a (patch)
tree52c674cace5652f5d359dedd02ee01f911559192 /src/video_core/buffer_cache/buffer_cache.h
parentd6e7ed18666c81ba8f424042ecbd121401673bb8 (diff)
parent609bfb7f69aaf449c443cdb84836996e376d3125 (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.h5
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 0510ed777a..186aca61d3 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();