On Tue May 26 04:43:30 2026 +0000, Henri Verbeet wrote:
Sadly it seems these tests get skipped on the testbot, but it seems surprising that d3d8:device passes for you; I don't think WINED3D_SWAPCHAIN_ALLOW_MS_LOCKABLE_BACKBUFFER gets set anywhere? There may be some value in having test coverage for swapchain creation as well.
```diff + /* d3d8 allows the lockable flag even though the backbuffer is
not lockable. */
+ if (swapchain_desc->multisample_type && !(swapchain_desc->flags & WINED3D_SWAPCHAIN_ALLOW_MS_LOCKABLE_BACKBUFFER) + && (swapchain_desc->flags & WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER)) + return WINED3DERR_INVALIDCALL; ``` I'd be inclined to put the test for WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER first; it's the main thing we're concerned with here, and it seems like the most likely test to fail. ```diff +#define WINED3D_SWAPCHAIN_ALLOW_MS_LOCKABLE_BACKBUFFER 0x00200000u /* Allow the swapchain flag, but not actual locking */ ``` I'd put the comment on a separate line. Broadly I think this approach works for me though. It passed because I built 64-bit Wine but ran the 32-bit d3d8 test.
The `WINED3D_SWAPCHAIN_ALLOW_MS_LOCKABLE_BACKBUFFER` is now added in d3d8, I rearranged the flag checks and moved them to a helper to allow use in `wined3d_swapchain_init()`, and I added `CreateDevice()` tests. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10874#note_141296