Skip to content

Commit

Permalink
rpcsx-gpu: handle VK_SUBOPTIMAL_KHR
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Oct 4, 2024
1 parent 87845d6 commit df22553
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rpcsx-gpu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,9 @@ int main(int argc, const char *argv[]) {
continue;
}

VK_VERIFY(acquireNextImageResult);
if (acquireNextImageResult != VK_SUBOPTIMAL_KHR) {
VK_VERIFY(acquireNextImageResult);
}
break;
}
}
Expand All @@ -600,7 +602,8 @@ int main(int argc, const char *argv[]) {

isImageAcquired = false;

if (vkQueuePresentResult == VK_ERROR_OUT_OF_DATE_KHR) {
if (vkQueuePresentResult == VK_ERROR_OUT_OF_DATE_KHR ||
vkQueuePresentResult == VK_SUBOPTIMAL_KHR) {
vkContext.recreateSwapchain();
} else {
VK_VERIFY(vkQueuePresentResult);
Expand Down

0 comments on commit df22553

Please sign in to comment.