summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-01-21 20:27:43 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-01-29 21:53:11 +0100
commitb35449c85d3adabf1a94b253549d8575910f6f8f (patch)
tree6a25c5cd64cd32f49655fcd8eb5495a2d5061a08 /src
parentMerge pull request #3355 from ReinUsesLisp/break-down (diff)
downloadyuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.tar
yuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.tar.gz
yuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.tar.bz2
yuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.tar.lz
yuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.tar.xz
yuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.tar.zst
yuzu-b35449c85d3adabf1a94b253549d8575910f6f8f.zip
Diffstat (limited to 'src')
-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();