This line is against the crash that gets hit after avoiding the first one, visible here: https://testbot.winehq.org/JobDetails.pl?Key=163329&f203=exe32.report#k203
This shows `dxgi.c:8010: Test failed: d3d10: test 1: Failed to create swapchain, hr 0x887a0001.`
So, yes, this seems to be about DXGI_SWAP_EFFECT_FLIP_DISCARD.
IIRC the issue there is that DXGI_SWAP_EFFECT_FLIP_DISCARD is introduced by DXGI 1.4, which is part of Windows 10. We should probably just check for DXGI 1.4 support before trying to use DXGI_SWAP_EFFECT_FLIP_DISCARD. In practice the easiest way to do that is probably to QI the IDXGIFactory interface for IID_IDXGIFactory4.
I fear there is now to much in this MR, should I at least put the missing winetest_pop_context into a separate MR?
Personally I tend to split MRs when I think I can get away with it, so as far as I'm concerned that makes sense. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11110#note_142662