https://bugs.winehq.org/show_bug.cgi?id=57233
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #77193|0 |1 is obsolete| |
--- Comment #14 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 77218 --> https://bugs.winehq.org/attachment.cgi?id=77218 Possible fix
I now better understand what is going on: the game creates a surface before the window resize and swapchain after the window resize, so the swapchain extents match the client area, but the surface does not.
The NVIDIA driver returns VK_ERROR_OUT_OF_DATE from vkAcquireNextImage, while AMD returns VK_SUBOPTIMAL. When VK_SUBOPTIMAL is returned the call succeeds, and images can be acquired and presented although they may end up distorted. This is why I'm not reproducing the problem on AMD.
With the vulkan renderer, the game doesn't even expect an error to occur here, and incorrectly waits on the fence forever. With the D3D11 renderer, the error triggers the swapchain recreation, but as we do not re-create or update the host surface size, it continues to return an error on the next call.
I'm attaching an alternate version of the fix to avoid going through the revert, if you don't mind testing. It fixes the VK_SUBOPTIMAL result for me, so I expect that it'll fix the VK_ERROR_OUT_OF_DATE on NVIDIA as well.
I think it's more future proof than the revert, if we consider that we might eventually need to allow multiple client surfaces for a window (to support cases where multiple APIs are used to render to the same HWND).