[Dawn Native] VK_ERROR_DEVICE_LOST when drag resizing window

7 views
Skip to first unread message

Kurtis Fields

unread,
Mar 28, 2026, 12:16:30 AM (9 days ago) Mar 28
to Dawn Graphics
OS:  Ubuntu 24.04
GPU:  RTX 2060
BACKEND: Vulkan

Has anyone else experienced this problem?
It happens with both SDL3 and GLFW.
Less so with GLFW.  I have to aggressively resize the window but I think this is because GLFW has a timer/throttle on the resize callback.

I fixed it by adding DeviceWaitIdle  in SwapChainVk.cpp:

MaybeError SwapChain::Initialize(SwapChainBase* previousSwapChain) {
Device* device = ToBackend(GetDevice());
PhysicalDevice* physicalDevice = ToBackend(GetDevice()->GetPhysicalDevice());

VkSwapchainKHR previousVkSwapChain = VK_NULL_HANDLE;

if (previousSwapChain != nullptr) {
// TODO(crbug.com/dawn/269): The first time a surface is used with a Device, check
// it is supported with vkGetPhysicalDeviceSurfaceSupportKHR.

// TODO(crbug.com/dawn/269): figure out what should happen when surfaces are used by
// multiple backends one after the other. It probably needs to block until the backend
// and GPU are completely finished with the previous swapchain.
DAWN_TRY(CheckVkSuccess(
device->fn.DeviceWaitIdle(device->GetVkDevice()),
"DeviceWaitIdle"));

Should I file a bug report?

Kai Ninomiya

unread,
Mar 28, 2026, 12:45:38 AM (9 days ago) Mar 28
to Kurtis Fields, Dawn Graphics
This sounds a lot like https://crbug.com/403297812 (search page for VK_ERROR_DEVICE_LOST), but that should be mostly fixed. Still, might be related.

If you can provide a reproduction case (or if it happens in an existing sample), a bug report would be appreciated! https://crbug.com/dawn/new
Please include info about your GPU driver, x11 vs wayland, display refresh rate, and anything else that might be relevant.

-Kai (he/they)


--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dawn-graphics/3770d2f6-f785-4c21-9ec1-7c7d77adeea9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages