diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_master_semaphore.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_master_semaphore.h b/src/video_core/renderer_vulkan/vk_master_semaphore.h index 33216d24a..2c7ed654d 100644 --- a/src/video_core/renderer_vulkan/vk_master_semaphore.h +++ b/src/video_core/renderer_vulkan/vk_master_semaphore.h | |||
| @@ -21,12 +21,12 @@ public: | |||
| 21 | 21 | ||
| 22 | /// Returns the current logical tick. | 22 | /// Returns the current logical tick. |
| 23 | [[nodiscard]] u64 CurrentTick() const noexcept { | 23 | [[nodiscard]] u64 CurrentTick() const noexcept { |
| 24 | return current_tick; | 24 | return current_tick.load(std::memory_order_relaxed); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | /// Returns the last known GPU tick. | 27 | /// Returns the last known GPU tick. |
| 28 | [[nodiscard]] u64 KnownGpuTick() const noexcept { | 28 | [[nodiscard]] u64 KnownGpuTick() const noexcept { |
| 29 | return gpu_tick; | 29 | return gpu_tick.load(std::memory_order_relaxed); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | /// Returns the timeline semaphore handle. | 32 | /// Returns the timeline semaphore handle. |
| @@ -36,7 +36,7 @@ public: | |||
| 36 | 36 | ||
| 37 | /// Returns true when a tick has been hit by the GPU. | 37 | /// Returns true when a tick has been hit by the GPU. |
| 38 | [[nodiscard]] bool IsFree(u64 tick) { | 38 | [[nodiscard]] bool IsFree(u64 tick) { |
| 39 | return gpu_tick >= tick; | 39 | return gpu_tick.load(std::memory_order_relaxed) >= tick; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /// Advance to the logical tick. | 42 | /// Advance to the logical tick. |
| @@ -46,7 +46,7 @@ public: | |||
| 46 | 46 | ||
| 47 | /// Refresh the known GPU tick | 47 | /// Refresh the known GPU tick |
| 48 | void Refresh() { | 48 | void Refresh() { |
| 49 | gpu_tick = semaphore.GetCounter(); | 49 | gpu_tick.store(semaphore.GetCounter(), std::memory_order_relaxed); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | /// Waits for a tick to be hit on the GPU | 52 | /// Waits for a tick to be hit on the GPU |