I am experiencing a curious driver issue. When switching a vulkan application to/from fullscreen, a hang in the NV vulkan driver is observed, with the callstack pointing to win32u.dll. This isn’t unsurprising since the window is expected to change size, but what is curious/annoying is that whatever the routine is polling does not time out. And it causes every event on the device to also hang. This includes waiting for fences, etc just forever returns VK_NOT_READY. At the moment of this deadlock, there has yet to be a chance to call vkAcquireNextImageKHR to observe a surface OUT_OF_DATE event and deal with it which can easily leave the application in a hung state. What is frustrating is that once this happens, there is no way out of it. I even installed a wndproc hook and I can clearly see the message pump is running smoothly, so I have no idea what the driver could be waiting for. Another curiosity is that this issue only happens if you present on the primary display. On multimonitor setups, launching in the secondary display does not freeze like this. Ofc running the renderer off a secondary card works just as well and also never hangs. There is a bug nonetheless since calling getSwapchainImagesKHR on the swapchain whilst in this state will cause the process to turn into an unkillable zombie. It cannot finish termination either in task manager, TerminateProcess methods or taskkill /f as I get an access denied error, likely because windows is forever waiting on the driver to finish something. I can also provide code/builds that will take down the entire OS including keyboard hid drivers (LED switching stops working), just because present was called on an out of date surface. I can provide links to code and builds with these problems if needed.
External issue: https://github.com/RPCS3/rpcs3/issues/5351