summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-03-31 20:58:27 -0300
committerGravatar ReinUsesLisp2020-03-31 21:32:07 -0300
commit7fe52ef77fa8e91af19378b1245e254084ea9a8e (patch)
treec27ab43ca22ff1dadecdf1eb788fae7e431a50ca /src
parentrenderer_vulkan/wrapper: Add device memory handle (diff)
downloadyuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.gz
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.xz
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.zip
renderer_vulkan/wrapper: Add fence handle
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/wrapper.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h
index 16d208649..96f498c13 100644
--- a/src/video_core/renderer_vulkan/wrapper.h
+++ b/src/video_core/renderer_vulkan/wrapper.h
@@ -615,6 +615,23 @@ public:
615 } 615 }
616}; 616};
617 617
618class Fence : public Handle<VkFence, VkDevice, DeviceDispatch> {
619 using Handle<VkFence, VkDevice, DeviceDispatch>::Handle;
620
621public:
622 VkResult Wait(u64 timeout = std::numeric_limits<u64>::max()) const noexcept {
623 return dld->vkWaitForFences(owner, 1, &handle, true, timeout);
624 }
625
626 VkResult GetStatus() const noexcept {
627 return dld->vkGetFenceStatus(owner, handle);
628 }
629
630 void Reset() const {
631 Check(dld->vkResetFences(owner, 1, &handle));
632 }
633};
634
618class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> { 635class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> {
619 using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle; 636 using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle;
620 637