summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-01 01:58:27 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-01 02:32:07 +0200
commit7fe52ef77fa8e91af19378b1245e254084ea9a8e (patch)
treec27ab43ca22ff1dadecdf1eb788fae7e431a50ca /src
parentrenderer_vulkan/wrapper: Add device memory handle (diff)
downloadyuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.gz
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.bz2
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.lz
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.xz
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.tar.zst
yuzu-7fe52ef77fa8e91af19378b1245e254084ea9a8e.zip
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:
}
};
+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;