On Tue Aug 18 14:52:24 2026 +0000, Stian Low wrote:
I was trying to minimize risks of breaking changes by keeping as much consistent as possible and reduce review efforts to expedite a fix but since it seems brought up multiple times I'll add alignment with d3d12 as part of this effort instead of splitting. `wined3d_swapchain_resize_buffers` seems to be what causes NieR to crash unlike all the other games so it may need extra work regardless so I'll account for it for `current_buffer_index` solution. Unclear if its related to swapchain use-after-free but I continue to keep it in mind during this debugging effort: - https://bugs.winehq.org/show_bug.cgi?id=58325 I wasn't aware IDXGISwapChain::ResizeBuffers can change the backbuffer count and not just the size.
MSDN says a call to ResizeBuffers is not allowed when references to the swapchain's backbuffers are held, and that includes existing views. We do check the d3d11 refcounts of backbuffers, but it is possible that views can slip through. I am a bit rusty on d3d11 refcounting, but if it is like d3d9, a view could be bound as current render target, have a non-zero external refcount and be "alive". -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10567#note_149446