Fullscreen Windows+Vulkan hang on vkAcquireNextImageKHR()

I have Vulkann issue that only happens on Windows (possibly w/ AMD) when using SDL’s fullscreen modes. The game locks up and the next call to vkAcquireNextImageKHR() never returns. This happens when switching into fullscreen using SDL_SetWindowFullscreen() regardless of the fullscreen window vs exclusive mode. Windows resizing works fine, so I don’t think it’s a problem with swapchain recreation. I don’t get any validation layer errors, and everything seems to work fine on Linux (AMD / NV / Intel / RPi4). I haven’t tested on Intel or NV for a while on Windows as I don’t have easy access to such a machine, but I don’t remember the problem occurring there.

Unsure if this is a problem in my Vulkan code, the driver, SDL, etc. I’m wondering if anybody else has run into something similar?

I don’t think this is a full solution and there is probably a solution that involves better synchronisation, buit a workaround is to set the swapchain create info’s minImageCount to max(2, caps.minImageCount). On AMD, a fullscreen swapchain has a min image count of 1 which seems to lead to the hang.

Ah! A blast from the past, but I haven’t fixed this issue yet. Will give it a try in a day or two! If it’s really an issue where I’m deadlocking myself when given a single image, that’s something concrete I can look for too. Thanks!