summaryrefslogtreecommitdiff
path: root/src/video_core/fence_manager.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2023-04-22 11:59:57 +0200
committerGravatar Fernando Sahmkow2023-04-23 22:03:44 +0200
commit7e76c1642cb4dfde5bfc97600ca3df7dcbea01de (patch)
tree6d68c31d9588def484be15d84cb54bb2f72af4df /src/video_core/fence_manager.h
parentFence Manager: implement async fence management in a sepparate thread. (diff)
downloadyuzu-7e76c1642cb4dfde5bfc97600ca3df7dcbea01de.tar.gz
yuzu-7e76c1642cb4dfde5bfc97600ca3df7dcbea01de.tar.xz
yuzu-7e76c1642cb4dfde5bfc97600ca3df7dcbea01de.zip
Accuracy Normal: reduce accuracy further for perf improvements in Project Lime
Diffstat (limited to 'src/video_core/fence_manager.h')
-rw-r--r--src/video_core/fence_manager.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h
index 027e663bf..19bbdd547 100644
--- a/src/video_core/fence_manager.h
+++ b/src/video_core/fence_manager.h
@@ -64,19 +64,24 @@ public:
64 } 64 }
65 65
66 void SignalFence(std::function<void()>&& func) { 66 void SignalFence(std::function<void()>&& func) {
67 bool delay_fence = Settings::IsGPULevelHigh();
67 if constexpr (!can_async_check) { 68 if constexpr (!can_async_check) {
68 TryReleasePendingFences<false>(); 69 TryReleasePendingFences<false>();
69 } 70 }
70 std::function<void()> callback = std::move(func);
71 const bool should_flush = ShouldFlush(); 71 const bool should_flush = ShouldFlush();
72 CommitAsyncFlushes(); 72 CommitAsyncFlushes();
73 TFence new_fence = CreateFence(!should_flush); 73 TFence new_fence = CreateFence(!should_flush);
74 if constexpr (can_async_check) { 74 if constexpr (can_async_check) {
75 guard.lock(); 75 guard.lock();
76 } 76 }
77 if (delay_fence) {
78 uncommitted_operations.emplace_back(std::move(func));
79 }
77 pending_operations.emplace_back(std::move(uncommitted_operations)); 80 pending_operations.emplace_back(std::move(uncommitted_operations));
78 QueueFence(new_fence); 81 QueueFence(new_fence);
79 callback(); 82 if (!delay_fence) {
83 func();
84 }
80 fences.push(std::move(new_fence)); 85 fences.push(std::move(new_fence));
81 if (should_flush) { 86 if (should_flush) {
82 rasterizer.FlushCommands(); 87 rasterizer.FlushCommands();