vk: Rebuild swapchain in case of unexpected errors during present

This commit is contained in:
kd-11 2022-03-27 19:58:58 +03:00 committed by kd-11
parent ffa841e7c1
commit b645a7faf5
1 changed files with 5 additions and 1 deletions

View File

@ -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<s64>(error));
swapchain_unavailable = true;
break;
}
}