Skip to content

Commit

Permalink
[Vulkan] Add Zeta's fix for VK_ERROR_OUT_OF_DATE_KHR and VK_SUBOPTIMA…
Browse files Browse the repository at this point in the history
…L_KHR
  • Loading branch information
RobDangerous committed Mar 25, 2023
1 parent 4d6e3aa commit f461797
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,13 @@ void kinc_g5_end(int window) {
present.pImageIndices = &vk_ctx.windows[vk_ctx.current_window].current_image;

VkResult err = vk.fpQueuePresentKHR(vk_ctx.queue, &present);
assert(err == VK_SUCCESS || err == VK_ERROR_OUT_OF_DATE_KHR);
if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) {
vkDeviceWaitIdle(vk_ctx.device);
create_swapchain(&vk_ctx.windows[window]);
}
else {
assert(err == VK_SUCCESS);
}

reuse_descriptor_sets();
began = false;
Expand Down

0 comments on commit f461797

Please sign in to comment.