2#include <UnCompute/Backend/FenceBase.h>
3#include <UnCompute/Memory/Memory.h>
4#include <UnCompute/VulkanBackend/VulkanInclude.h>
10 VkFence m_NativeFence = VK_NULL_HANDLE;
19 void Reset()
override;
21 ResultCode
WaitOnCpu(std::chrono::nanoseconds timeout)
override;
25 return WaitOnCpu(std::chrono::nanoseconds::max());
31 [[nodiscard]]
inline VkFence GetNativeFence()
const
36 inline static ResultCode Create(IComputeDevice* pDevice, IFence** ppFence)
38 *ppFence = AllocateObject<VulkanFence>(pDevice);
40 return ResultCode::Success;
Definition: FenceBase.h:8
Interface for all backend-specific compute devices.
Definition: IComputeDevice.h:38
Definition: VulkanFence.h:9
FenceState GetState() override
Get current fence state.
Definition: VulkanFence.cpp:53
void ResetState() override
Reset fence state.
Definition: VulkanFence.cpp:47
ResultCode WaitOnCpu() override
Wait for the fence to signal.
Definition: VulkanFence.h:23
void Reset() override
Reset the object to uninitialized state.
Definition: VulkanFence.cpp:16
ResultCode SignalOnCpu() override
Signal the fence on CPU.
Definition: VulkanFence.cpp:28
Fence descriptor.
Definition: IFence.h:16