win32/vulkan: the in-place fullscreen toggle is switched off for now

35f2d183d let a borderless fullscreen toggle restyle the window it
has, with the Vulkan driver seeing a resize. On the machine it was
written for the window does what it should, and then:

  [Vulkan] QueuePresent failed (err = -1000001004, result = -1000001004), destroying swapchain.
  [Vulkan] Got 3 swapchain images.
  [Vulkan] The device was lost (VK_ERROR_DEVICE_LOST).
  [Video] The GPU device was lost; reinitialising the video driver.

The present after the resize is out of date, as it should be; the
swapchain is rebuilt; and the next frame's vkQueueSubmit answers
VK_ERROR_DEVICE_LOST. The restart that follows goes the same way two
more times before it holds. Until the swapchain is rebuilt the old
one is shown at its old size in the fullscreen window, which is the
small picture seen on the way.

This is the third form of one thing on that setup (NVIDIA, HDR10
swapchain, threaded video): a swapchain rebuilt on a live window is
followed by a lost device or a dead picture. A toggle that restarts
the drivers builds its swapchain once and works there, so the Windows
Vulkan context stops offering GFX_CTX_FLAGS_FULLSCREEN_IN_PLACE and
the toggle goes back to the restart.

win32_window_set_fullscreen(), its use in the context's
set_video_mode, and the test of it on a real window all stay; only
the flag goes, and comes back when a rebuild holds.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-10-03 03:50:30 +02:00
1 parent 35f2d183dc
commit 8083cb12a3
1 file changed
+6 -1
+6 -1
View File
@@ -309,7 +309,12 @@ static uint32_t gfx_ctx_w_vk_get_flags(void *data)
&win32_vk.context.supports_adaptive_vsync))
BIT32_SET(flags, GFX_CTX_FLAGS_ADAPTIVE_VSYNC);
BIT32_SET(flags, GFX_CTX_FLAGS_FULLSCREEN_IN_PLACE);
/* GFX_CTX_FLAGS_FULLSCREEN_IN_PLACE is not set, for now. The window
* side of an in-place fullscreen toggle works, but the toggle ends
* in a swapchain rebuilt on a live window, and on at least one
* NVIDIA setup a rebuild is followed by VK_ERROR_DEVICE_LOST from
* the next submit. Until that is understood a toggle restarts the
* drivers, which builds the swapchain once and works there. */
#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS)
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG);