diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-19 06:09:05 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-19 20:31:33 +0100 |
commit | 54747d60bc6cce24b51af737ef2b26b6b120661e (patch) | |
tree | 680d3f9d5d893d676769bd1b409ea67419cc196f /src/video_core/renderer_vulkan/vk_resource_manager.cpp | |
parent | vk_device: Add query for RGBA8Uint (diff) | |
download | yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.tar yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.tar.gz yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.tar.bz2 yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.tar.lz yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.tar.xz yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.tar.zst yuzu-54747d60bc6cce24b51af737ef2b26b6b120661e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_resource_manager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_resource_manager.cpp b/src/video_core/renderer_vulkan/vk_resource_manager.cpp index 13c46e5b8..a0ca5f2ae 100644 --- a/src/video_core/renderer_vulkan/vk_resource_manager.cpp +++ b/src/video_core/renderer_vulkan/vk_resource_manager.cpp @@ -72,9 +72,18 @@ VKFence::VKFence(const VKDevice& device, UniqueFence handle) VKFence::~VKFence() = default; void VKFence::Wait() { + static constexpr u64 timeout = std::numeric_limits<u64>::max(); const auto dev = device.GetLogical(); const auto& dld = device.GetDispatchLoader(); - dev.waitForFences({*handle}, true, std::numeric_limits<u64>::max(), dld); + switch (const auto result = dev.waitForFences(1, &*handle, true, timeout, dld)) { + case vk::Result::eSuccess: + return; + case vk::Result::eErrorDeviceLost: + device.ReportLoss(); + [[fallthrough]]; + default: + vk::throwResultException(result, "vk::waitForFences"); + } } void VKFence::Release() { |