[DesktopVK] Rendering glitch depending on the first presentMode
#9,005 创建于 2025年9月7日
仓库指标
- 星标
- (13,886 个星标)
- PR 合并指标
- (平均合并 25天 3小时) (30 天内合并 22 个 PR)
描述
I am running into a very bizarre rendering glitch that depends on the swapchain presentMode that is first initialized with the first swapchain created, and that will persist over all the next swapchain recreated even if the presentMode is changed.
Left is glitched, right is correct.
This one and the same texture, no composition, just one single sprite, white background included. The entire screen and every assets are impacted.
The thing is: it doesn't look like a Vulkan problem. When profiled with RenderDoc, the image that is passed to the presentation engine is perfect and shows no glitch. The glitch is introduction by the presentation engine when pushed to the surface.
So it might be an SDL or a driver bug.
The very bizarre aspect of this bug, is that the type of glitch depends on which presentMode is first set. Each mode shows a different set of bugs that persist beyond presentMode change, and it is like the presentMode itself is broken.
I don't know if it's related to providing an oldSwapchain to VkCreateSwapchainKHR(), but it doesn't look like it (at least the VK specs doesn't mention anything that seems related to this, but who knows what drivers do behind the scene in that regard).