diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-13 09:57:28 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-13 09:57:28 +0100 |
commit | dd9caf9aa02fb46dad4799055a85ce132ae20172 (patch) | |
tree | 91de8ac7977d6b67fe3215576291d851a6048c73 /src/video_core/renderer_vulkan/vk_master_semaphore.h | |
parent | vk_staging_buffer_pool: Inline tick tests (diff) | |
download | yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.tar yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.tar.gz yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.tar.bz2 yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.tar.lz yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.tar.xz yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.tar.zst yuzu-dd9caf9aa02fb46dad4799055a85ce132ae20172.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_master_semaphore.h')
-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: /// Returns the current logical tick. [[nodiscard]] u64 CurrentTick() const noexcept { - return current_tick; + return current_tick.load(std::memory_order_relaxed); } /// Returns the last known GPU tick. [[nodiscard]] u64 KnownGpuTick() const noexcept { - return gpu_tick; + return gpu_tick.load(std::memory_order_relaxed); } /// Returns the timeline semaphore handle. @@ -36,7 +36,7 @@ public: /// Returns true when a tick has been hit by the GPU. [[nodiscard]] bool IsFree(u64 tick) { - return gpu_tick >= tick; + return gpu_tick.load(std::memory_order_relaxed) >= tick; } /// Advance to the logical tick. @@ -46,7 +46,7 @@ public: /// Refresh the known GPU tick 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 |