On Mon Aug 17 18:50:23 2026 +0000, Stefan Dösinger wrote:
Regarding delayed clears and swaps: The locations are already swapped by wined3d_swapchain_gl_rotate and wined3d_swapchain_vk_rotate. I think what is missing is rotating the clear color. Actually I think I am wrong on that one. It only rotates locations explicitly mentioned in supported_locations, and LOCATION_CLEARED is not one of them. So it should clear the texture copy before rotating. In either case, I don't think delayed clear handling should hold up this merge request. I'll have a look at it myself and see if I can find out what's wrong there. I think the reason for the (past?) test failure with delayed clears is that e.g. a sRGB view is used to clear the texture, the clear color gets stored in the texture itself, then a RGB view is used to draw to the texture. Now the vulkan pass setup uses the RGB view to interpret the load color and things break.
We don't do delayed clears on typeless formats for this reason (see vk_blitter_clear_rendertargets), but backbuffer textures are an exception: They allow a sRGB mismatched view attached to a typed format - the cause of the bug Stian set out to fix. The check in vk_blitter_clear_rendertargets either needs to treat swapchain buffers as typeless or both vk_blitter_clear_rendertargets and the renderpass setup need to convert between texture and view RGB/sRGB formats. In either case this is not something this MR needs to be concerned about. I'll write a test and send an MR to address that -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10567#note_149097