Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence Vulkan "Unable to acquire framebuffer." swapchain error #94135

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion servers/rendering/rendering_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3500,7 +3500,12 @@ Error RenderingDevice::screen_prepare_for_drawing(DisplayServer::WindowID p_scre
framebuffer = driver->swap_chain_acquire_framebuffer(main_queue, it->value, resize_required);
}

ERR_FAIL_COND_V_MSG(framebuffer.id == 0, FAILED, "Unable to acquire framebuffer.");
if (framebuffer.id == 0) {
// Some drivers like NVIDIA are fast enough to invalidate the swap chain between resizing and acquisition (GH-94104).
// This typically occurs during continuous window resizing operations, especially if done quickly.
// Allow this to fail silently since it has no visual consequences.
return ERR_CANT_CREATE;
}

// Store the framebuffer that will be used next to draw to this screen.
screen_framebuffers[p_screen] = framebuffer;
Expand Down
Loading