diff options
| author | 2020-03-31 20:58:27 -0300 | |
|---|---|---|
| committer | 2020-03-31 21:32:07 -0300 | |
| commit | 7fe52ef77fa8e91af19378b1245e254084ea9a8e (patch) | |
| tree | c27ab43ca22ff1dadecdf1eb788fae7e431a50ca /src | |
| parent | renderer_vulkan/wrapper: Add device memory handle (diff) | |
| download | yuzu-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.h | 17 |
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 | ||
| 618 | class Fence : public Handle<VkFence, VkDevice, DeviceDispatch> { | ||
| 619 | using Handle<VkFence, VkDevice, DeviceDispatch>::Handle; | ||
| 620 | |||
| 621 | public: | ||
| 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 | |||
| 618 | class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> { | 635 | class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> { |
| 619 | using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle; | 636 | using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle; |
| 620 | 637 | ||