DesktopVK fixes by ThomasFOG · Pull Request #8999 · MonoGame/MonoGame

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite. The window pilots the surface, which pilots the backbuffer. When the surface is modified, vkQueuePresentKHR() will let you know that it changed and that the swapchain must/is ready to be recreated.

If we recreate the swapchain manually, there will be a chain of events that will recreate 2 to 3 times the swapchain on the same frame with different, and most of time broken/wrong sizes (e.g. when exiting fullscreen, SDL sends a 800x600 event that will be processed after VK has gracefully recreated the swapchain, and overriding the correct values ; another one is windows sending a 0x0 resize upon minimizing, which should be ignored and rendering just disabled).