summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache/buffer_cache.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-02-03 22:56:25 +0100
committerGitHub <noreply@github.com>2020-02-03 22:56:25 +0100
commitc31ec00d676f6dda0bebee70d7a0b230e5babee9 (patch)
tree52c674cace5652f5d359dedd02ee01f911559192 /src/video_core/buffer_cache/buffer_cache.h
parentMerge pull request #3374 from lioncash/udp (diff)
parentci: Disable Vulkan for Windows MinGW builds (diff)
downloadyuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.tar
yuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.tar.gz
yuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.tar.bz2
yuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.tar.lz
yuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.tar.xz
yuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.tar.zst
yuzu-c31ec00d676f6dda0bebee70d7a0b230e5babee9.zip
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 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();