On Thu Aug 20 20:36:21 2026 +0000, Stefan Dösinger wrote:
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". These logs seem to be part of the problem for rtv views rotations only which happen for master without any of my changes so it seems this merge may be exposing another discrepancy similar to test fails that may be fixed via !11690:
`0024:err:d3d:wined3d_swapchain_resize_buffers Something's still holding back buffer 0 (00007FFFFE88E5D0), swapchain 00007FFFFE88DBE0.` Skipping `swapchain->back_buffers[i]->swapchain = NULL;` for `wined3d_swapchain_resize_buffers` prevents NieR from crashing with backtrace. It creates two swapchains with one as the parent of the other which seems less common unless I've been overlooking that scenario for other games. Still unclear if its actually related to whatever is causing the crash. I added additional wined3d_lock/unlocks but it seems to just be adding redundancies of what is already wrapped so whatever is holding back buffer 0 seems fairly subtle which again seems related to bug-58325. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10567#note_149488