mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-14 21:09:59 +00:00
vk_master_semaphore: Mark gpu_tick atomic operations with relaxed order
This commit is contained in:
parent
6171566296
commit
dd9caf9aa0
1 changed files with 4 additions and 4 deletions
|
@ -21,12 +21,12 @@ public:
|
||||||
|
|
||||||
/// Returns the current logical tick.
|
/// Returns the current logical tick.
|
||||||
[[nodiscard]] u64 CurrentTick() const noexcept {
|
[[nodiscard]] u64 CurrentTick() const noexcept {
|
||||||
return current_tick;
|
return current_tick.load(std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the last known GPU tick.
|
/// Returns the last known GPU tick.
|
||||||
[[nodiscard]] u64 KnownGpuTick() const noexcept {
|
[[nodiscard]] u64 KnownGpuTick() const noexcept {
|
||||||
return gpu_tick;
|
return gpu_tick.load(std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the timeline semaphore handle.
|
/// Returns the timeline semaphore handle.
|
||||||
|
@ -36,7 +36,7 @@ public:
|
||||||
|
|
||||||
/// Returns true when a tick has been hit by the GPU.
|
/// Returns true when a tick has been hit by the GPU.
|
||||||
[[nodiscard]] bool IsFree(u64 tick) {
|
[[nodiscard]] bool IsFree(u64 tick) {
|
||||||
return gpu_tick >= tick;
|
return gpu_tick.load(std::memory_order_relaxed) >= tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Advance to the logical tick.
|
/// Advance to the logical tick.
|
||||||
|
@ -46,7 +46,7 @@ public:
|
||||||
|
|
||||||
/// Refresh the known GPU tick
|
/// Refresh the known GPU tick
|
||||||
void Refresh() {
|
void Refresh() {
|
||||||
gpu_tick = semaphore.GetCounter();
|
gpu_tick.store(semaphore.GetCounter(), std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Waits for a tick to be hit on the GPU
|
/// Waits for a tick to be hit on the GPU
|
||||||
|
|
Loading…
Reference in a new issue