mirror of https://github.com/snes9xgit/snes9x.git
Vulkan: Change timeouts to be more reasonable.
Report when timeout fails.
This commit is contained in:
parent
c13e4d8330
commit
7b6ba01760
|
@ -205,14 +205,14 @@ bool Swapchain::begin_frame()
|
|||
|
||||
auto &frame = frames[current_frame];
|
||||
|
||||
auto result = device.waitForFences(frame.fence.get(), true, UINT64_MAX);
|
||||
auto result = device.waitForFences(frame.fence.get(), true, 33333333);
|
||||
if (result != vk::Result::eSuccess)
|
||||
{
|
||||
printf("Failed fence\n");
|
||||
printf("Timed out waiting for fence.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto result_value = device.acquireNextImageKHR(swapchain_object.get(), UINT64_MAX, frame.acquire.get());
|
||||
auto result_value = device.acquireNextImageKHR(swapchain_object.get(), 33333333, frame.acquire.get());
|
||||
if (result_value.result == vk::Result::eErrorOutOfDateKHR ||
|
||||
result_value.result == vk::Result::eSuboptimalKHR)
|
||||
{
|
||||
|
@ -221,6 +221,12 @@ bool Swapchain::begin_frame()
|
|||
return begin_frame();
|
||||
}
|
||||
|
||||
if (result_value.result == vk::Result::eTimeout)
|
||||
{
|
||||
printf("Timed out waiting for swapchain.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result_value.result != vk::Result::eSuccess)
|
||||
{
|
||||
printf("Unable to acquire swapchain image: %s\n", vk::to_string(result_value.result).c_str());
|
||||
|
|
Loading…
Reference in New Issue