Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
dev
-
None
Description
- The wayland `wl_surface` object has the lifespan of a window visiblity
- The VkSurfaceKHR has a reference to the wl_surface so it must also have a lifespan of the window visiblity
- The RHI swapchain has a lifespan of the platform window (QSGGuiThreadRenderLoop::eventFilter). The platformWindow can have a slightly different lifespan to the window itself, but it is not the same as visiblity.
- The vulkan swapchain has same lifepsan as the RHI swapchain.
Right now when we when hide a QtQuick window we delete theVkSurface but not the Swapchain.
The Vulkan spec states: "All VkSwapchainKHR objects created for surface must have been destroyed prior to destroying surface."
This causes a crash(assert) on Intel.
I made a bodgy patch that works (emitting PlatformSurfaceChanged events from the wayland QPA), but we need a path for something more acceptable.