Windows: VideoOut crashes intermittently when the Dozen (Vulkan on D3D12) driver is installed, even though the native driver is selected #3255

Closed
opened 2026-10-11 03:37:48 +00:00 by reyani-dev · 2 comments
reyani-dev commented 2026-10-11 03:37:48 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T03:37:48Z.


On a Windows machine with Microsoft's "OpenCL, OpenGL, and Vulkan Compatibility Pack" installed, which provides Mesa's Dozen Vulkan-on-D3D12 driver (vulkan_dzn.dll), the VideoOut tests crash intermittently. They crash inside the D3D12 user-mode drivers while the Vulkan instance enumerates devices. AnyPS5 still selects the native driver; Dozen only has to be installed.

Setup. Windows 11, NVIDIA GeForce RTX 4070 Laptop GPU plus AMD Radeon 780M, current drivers, WinLibs GCC 15.2.0 r7, Release, main 961b25fe. The loader reports five devices:

NVIDIA GeForce RTX 4070 Laptop GPU                       (native, selected)
Microsoft Direct3D12 (NVIDIA GeForce RTX 4070 Laptop GPU)  (Dozen)
AMD Radeon 780M Graphics                                 (native)
Microsoft Direct3D12 (AMD Radeon 780M Graphics)           (Dozen)
Microsoft Direct3D12 (Microsoft Basic Render Driver)      (Dozen)

Measured, 10 runs each:

guest_video_out_resolution_status guest_video_out_output_mode
default 7/10 crash 9/10 crash
VK_LOADER_DRIVERS_DISABLE=*dzn* 0/10 0/10

The crashes are 0xc0000005, right after Vulkan surface created, with the faulting thread in a D3D12 user-mode driver. That has been amdxc64.dll in one run, and nvwgf2umx.dll with vulkan_dzn.dll / D3D12Core.dll frames in another. Dozen creates D3D12 devices for every adapter during vkEnumeratePhysicalDevices, and those drivers crash on their own threads. VulkanDevice.cpp itself only reads the Dozen devices' properties and skips them, since the native NVIDIA device ranks first. CI doesn't see this because its runners have no Vulkan driver, and these tests skip there.

Workaround for users: set VK_LOADER_DRIVERS_DISABLE=*dzn*, or uninstall the compatibility pack, if a native Vulkan driver is present.

Possible fix (needs a decision, so I haven't opened a PR). Before creating the instance, when the user hasn't set VK_LOADER_DRIVERS_DISABLE or ANYPS5_GPU, the Windows VulkanDevice could disable *dzn*, and fall back to an instance with Dozen only if no device is found without it. Some machines rely on Dozen as their only Vulkan driver (Windows on ARM, some VMs), so it can't simply be excluded. Opinions on whether that belongs in AnyPS5 or only in the user docs are welcome; I'm happy to implement either.

Found with Claude Code.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5797654745 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3255). Originally posted by [reyani-dev](https://github.com/reyani-dev) on 2026-10-11T03:37:48Z. --- On a Windows machine with Microsoft's "OpenCL, OpenGL, and Vulkan Compatibility Pack" installed, which provides Mesa's Dozen Vulkan-on-D3D12 driver (`vulkan_dzn.dll`), the VideoOut tests crash intermittently. They crash inside the D3D12 user-mode drivers while the Vulkan instance enumerates devices. AnyPS5 still selects the native driver; Dozen only has to be installed. **Setup.** Windows 11, NVIDIA GeForce RTX 4070 Laptop GPU plus AMD Radeon 780M, current drivers, WinLibs GCC 15.2.0 r7, Release, `main` 961b25fe. The loader reports five devices: ``` NVIDIA GeForce RTX 4070 Laptop GPU (native, selected) Microsoft Direct3D12 (NVIDIA GeForce RTX 4070 Laptop GPU) (Dozen) AMD Radeon 780M Graphics (native) Microsoft Direct3D12 (AMD Radeon 780M Graphics) (Dozen) Microsoft Direct3D12 (Microsoft Basic Render Driver) (Dozen) ``` **Measured, 10 runs each:** | | `guest_video_out_resolution_status` | `guest_video_out_output_mode` | |---|---|---| | default | 7/10 crash | 9/10 crash | | `VK_LOADER_DRIVERS_DISABLE=*dzn*` | 0/10 | 0/10 | The crashes are `0xc0000005`, right after `Vulkan surface created`, with the faulting thread in a D3D12 user-mode driver. That has been `amdxc64.dll` in one run, and `nvwgf2umx.dll` with `vulkan_dzn.dll` / `D3D12Core.dll` frames in another. Dozen creates D3D12 devices for every adapter during `vkEnumeratePhysicalDevices`, and those drivers crash on their own threads. `VulkanDevice.cpp` itself only reads the Dozen devices' properties and skips them, since the native NVIDIA device ranks first. CI doesn't see this because its runners have no Vulkan driver, and these tests skip there. **Workaround for users:** set `VK_LOADER_DRIVERS_DISABLE=*dzn*`, or uninstall the compatibility pack, if a native Vulkan driver is present. **Possible fix** (needs a decision, so I haven't opened a PR). Before creating the instance, when the user hasn't set `VK_LOADER_DRIVERS_DISABLE` or `ANYPS5_GPU`, the Windows `VulkanDevice` could disable `*dzn*`, and fall back to an instance with Dozen only if no device is found without it. Some machines rely on Dozen as their only Vulkan driver (Windows on ARM, some VMs), so it can't simply be excluded. Opinions on whether that belongs in AnyPS5 or only in the user docs are welcome; I'm happy to implement either. Found with Claude Code.
reyani-dev commented 2026-10-11 06:08:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T06:08:52Z.


It isn't limited to the VideoOut tests: the AGC tests crash the same way. Same machine, main 4be74d4f, RTX 4070 Laptop (driver 616.92), 10 runs of agc_driver_flat_loads through ctest:

failures
default 4/10
VK_LOADER_DRIVERS_DISABLE=*dzn* 0/10

With Dozen disabled, the whole ctest -R "^agc_|video_out" set passes 355/355. That makes Dozen the cause of the intermittent GPU-test failures I'd been seeing on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106109155 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3255#issuecomment-6106109155). Originally posted by [reyani-dev](https://github.com/reyani-dev) on 2026-10-11T06:08:52Z. --- It isn't limited to the VideoOut tests: the AGC tests crash the same way. Same machine, `main` `4be74d4f`, RTX 4070 Laptop (driver 616.92), 10 runs of `agc_driver_flat_loads` through `ctest`: | | failures | |---|---| | default | 4/10 | | `VK_LOADER_DRIVERS_DISABLE=*dzn*` | 0/10 | With Dozen disabled, the whole `ctest -R "^agc_|video_out"` set passes 355/355. That makes Dozen the cause of the intermittent GPU-test failures I'd been seeing on this machine.
oneandonlydean commented 2026-10-11 23:26:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:26:45Z.


Closing: #3768 documents VK_LOADER_DRIVERS_DISABLE=*dzn* in USAGE.md.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115094742 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3255#issuecomment-6115094742). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:26:45Z. --- Closing: #3768 documents `VK_LOADER_DRIVERS_DISABLE=*dzn*` in USAGE.md.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#3255
No description provided.