From b645a7faf5e18d712342f20d9e87310ba091702c Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 27 Mar 2022 19:58:58 +0300 Subject: [PATCH] vk: Rebuild swapchain in case of unexpected errors during present --- rpcs3/Emu/RSX/VK/VKPresent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/VK/VKPresent.cpp b/rpcs3/Emu/RSX/VK/VKPresent.cpp index 9023c93924..938236f5da 100644 --- a/rpcs3/Emu/RSX/VK/VKPresent.cpp +++ b/rpcs3/Emu/RSX/VK/VKPresent.cpp @@ -97,7 +97,11 @@ void VKGSRender::present(vk::frame_context_t *ctx) swapchain_unavailable = true; break; default: - vk::die_with_error(error); + // Other errors not part of rpcs3. This can be caused by 3rd party injectors with bad code, of which we have no control over. + // Let the application attempt to recover instead of crashing outright. + rsx_log.error("VkPresent returned unexpected error code %lld. Will attempt to recreate the swapchain. Please disable 3rd party injector tools.", static_cast(error)); + swapchain_unavailable = true; + break; } }