Throw an exception when vkWaitForFences times out
This commit is contained in:
@@ -354,7 +354,8 @@ text text_rasterizer::render(std::string_view s)
|
||||
vk::SubmitInfo submit_info;
|
||||
submit_info.setCommandBuffers(*cmdbuf);
|
||||
queue.submit(submit_info, *fence);
|
||||
device.waitForFences(*fence, VK_TRUE, UINT64_MAX);
|
||||
if (device.waitForFences(*fence, VK_TRUE, UINT64_MAX) == vk::Result::eTimeout)
|
||||
throw std::runtime_error("Vulkan fence timeout");
|
||||
device.resetFences(*fence);
|
||||
|
||||
return return_value;
|
||||
|
||||
@@ -400,7 +400,8 @@ void scenes::lobby::render()
|
||||
|
||||
session.end_frame(framestate.predictedDisplayTime, layers_base);
|
||||
|
||||
device.waitForFences(*fence, VK_TRUE, UINT64_MAX);
|
||||
if (device.waitForFences(*fence, VK_TRUE, UINT64_MAX) == vk::Result::eTimeout)
|
||||
throw std::runtime_error("Vulkan fence timeout");
|
||||
device.resetFences(*fence);
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +400,8 @@ void scenes::stream::render()
|
||||
layers_base.push_back(reinterpret_cast<XrCompositionLayerBaseHeader *>(&layer));
|
||||
session.end_frame(/*timestamp*/ framestate.predictedDisplayTime, layers_base);
|
||||
|
||||
device.waitForFences(*fence, VK_TRUE, UINT64_MAX);
|
||||
if (device.waitForFences(*fence, VK_TRUE, UINT64_MAX) == vk::Result::eTimeout)
|
||||
throw std::runtime_error("Vulkan fence timeout");
|
||||
device.resetFences(*fence);
|
||||
|
||||
// We don't need those after vkWaitForFences
|
||||
|
||||
Reference in New Issue
Block a user