mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-05 09:29:58 +00:00
vk_master_semaphore: Use fetch_add to increase master semaphore tick
This commit is contained in:
parent
b10cf64c48
commit
a515036604
2 changed files with 4 additions and 6 deletions
|
@ -39,9 +39,9 @@ public:
|
||||||
return KnownGpuTick() >= tick;
|
return KnownGpuTick() >= tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Advance to the logical tick.
|
/// Advance to the logical tick and return the old one
|
||||||
void NextTick() noexcept {
|
[[nodiscard]] u64 NextTick() noexcept {
|
||||||
++current_tick;
|
return current_tick.fetch_add(1, std::memory_order::relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Refresh the known GPU tick
|
/// Refresh the known GPU tick
|
||||||
|
|
|
@ -168,9 +168,7 @@ void VKScheduler::SubmitExecution(VkSemaphore semaphore) {
|
||||||
EndPendingOperations();
|
EndPendingOperations();
|
||||||
InvalidateState();
|
InvalidateState();
|
||||||
|
|
||||||
const u64 signal_value = master_semaphore->CurrentTick();
|
const u64 signal_value = master_semaphore->NextTick();
|
||||||
master_semaphore->NextTick();
|
|
||||||
|
|
||||||
Record([semaphore, signal_value, this](vk::CommandBuffer cmdbuf) {
|
Record([semaphore, signal_value, this](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.End();
|
cmdbuf.End();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue