abort if queuepresent fails

This commit is contained in:
Joshua Ashton 2024-01-13 09:16:42 +00:00
parent 3c3a5002d3
commit 51800db311
1 changed files with 2 additions and 0 deletions

View File

@ -231,6 +231,7 @@ namespace orange
// TODO: Handle failure properly.
if ((res = vkQueueSubmit(m_ctx.Queue(), 1, &submitInfo, m_inFlightFences[m_currentFrame])) != VK_SUCCESS) {
log::err("Failed to submit work: %d", res);
abort();
return;
}
@ -247,6 +248,7 @@ namespace orange
res = vkQueuePresentKHR(m_ctx.Queue(), &presentInfo);
if (res != VK_SUCCESS && res != VK_SUBOPTIMAL_KHR) {
log::err("Failed to submit present: %d", res);
abort();
return;
}