Summary
When entering or exiting fullscreen on Windows, my application detects the change in window/display state and subsequently recreates the Vulkan swapchain. During this transition, the system may completely freeze.
After testing multiple configurations, the issue appears to occur specifically when using SDL3's borderless fullscreen mode through SDL_SetWindowFullscreen().
Reproduction
-
Clone the following repository:
https://github.com/Real-Ratty-Games/Tudo
-
In Engine.cpp, change:
mGDevice = new GraphicsDevice(*mWindow, EDrawAPI::DIRECT3D11, false);
to use Vulkan:
mGDevice = new GraphicsDevice(*mWindow, EDrawAPI::VULKAN, false);
-
Run the application.
-
Press F1 to enter fullscreen.
-
Press F1 again to exit fullscreen.
Expected behavior
The application switches from borderless fullscreen back to windowed mode and continues running normally.
Actual behavior
The entire system freezes when exiting fullscreen.
I have been able to reproduce the issue on multiple physical PCs and laptops. I have not been able to reproduce it in virtual machines using GPU virtualization.
The application uses bgfx for rendering, but I have not been able to trace the issue back to bgfx itself.
Previous versions of SDL3 did not have this issue.
Workaround
The issue can be avoided by explicitly forcing one of the available display modes returned by SDL_GetFullscreenDisplayModes() instead of relying on SDL3's borderless fullscreen behavior.
I am not sure whether the issue is caused by SDL's handling of the fullscreen transition, the resulting display mode change, or the interaction between SDL3 and Vulkan during swapchain recreation.
My current guess is that the Vulkan swapchain recreation triggers a deadlock somewhere in the GPU driver or graphics stack, ultimately causing the system to freeze.
Summary
When entering or exiting fullscreen on Windows, my application detects the change in window/display state and subsequently recreates the Vulkan swapchain. During this transition, the system may completely freeze.
After testing multiple configurations, the issue appears to occur specifically when using SDL3's borderless fullscreen mode through
SDL_SetWindowFullscreen().Reproduction
Clone the following repository:
https://github.com/Real-Ratty-Games/Tudo
In
Engine.cpp, change:to use Vulkan:
Run the application.
Press
F1to enter fullscreen.Press
F1again to exit fullscreen.Expected behavior
The application switches from borderless fullscreen back to windowed mode and continues running normally.
Actual behavior
The entire system freezes when exiting fullscreen.
I have been able to reproduce the issue on multiple physical PCs and laptops. I have not been able to reproduce it in virtual machines using GPU virtualization.
The application uses bgfx for rendering, but I have not been able to trace the issue back to bgfx itself.
Previous versions of SDL3 did not have this issue.
Workaround
The issue can be avoided by explicitly forcing one of the available display modes returned by
SDL_GetFullscreenDisplayModes()instead of relying on SDL3's borderless fullscreen behavior.I am not sure whether the issue is caused by SDL's handling of the fullscreen transition, the resulting display mode change, or the interaction between SDL3 and Vulkan during swapchain recreation.
My current guess is that the Vulkan swapchain recreation triggers a deadlock somewhere in the GPU driver or graphics stack, ultimately causing the system to freeze.