fix: flush GPU before first render frame after world load

Add vkDeviceWaitIdle after world loading completes to ensure all async
texture uploads and resource creation are fully flushed before the
first render frame. Mitigates intermittent NVIDIA driver crashes at
vkCmdBeginRenderPass during initial world entry.
This commit is contained in:
Kelsi 2026-03-24 13:34:52 -07:00
parent 891b9e5822
commit 7a5d80e801

View file

@ -5311,6 +5311,14 @@ void Application::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
showProgress("Entering world...", 1.0f);
// Ensure all GPU resources (textures, buffers, pipelines) created during
// world load are fully flushed before the first render frame. Without this,
// vkCmdBeginRenderPass can crash on NVIDIA 590.x when resources from async
// uploads haven't completed their queue operations.
if (renderer && renderer->getVkContext()) {
vkDeviceWaitIdle(renderer->getVkContext()->getDevice());
}
if (loadingScreenOk) {
loadingScreen.shutdown();
}