mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-01 12:57:52 +00:00
renderer_vulkan/wrapper: Add fence handle
This commit is contained in:
parent
3a63ae0658
commit
7fe52ef77f
1 changed files with 17 additions and 0 deletions
|
@ -615,6 +615,23 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class Fence : public Handle<VkFence, VkDevice, DeviceDispatch> {
|
||||
using Handle<VkFence, VkDevice, DeviceDispatch>::Handle;
|
||||
|
||||
public:
|
||||
VkResult Wait(u64 timeout = std::numeric_limits<u64>::max()) const noexcept {
|
||||
return dld->vkWaitForFences(owner, 1, &handle, true, timeout);
|
||||
}
|
||||
|
||||
VkResult GetStatus() const noexcept {
|
||||
return dld->vkGetFenceStatus(owner, handle);
|
||||
}
|
||||
|
||||
void Reset() const {
|
||||
Check(dld->vkResetFences(owner, 1, &handle));
|
||||
}
|
||||
};
|
||||
|
||||
class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> {
|
||||
using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle;
|
||||
|
||||
|
|
Loading…
Reference in a new issue