Fix DXVK companion extraction for vkd3d

BU
7d ago
+38-14

Root cause

When VKD3D is selected, GameNative installs DXVK as the companion provider for DXGI. Imported or stale configs can contain a DXVK version that is not present in the shipped manifest. The downloader returns null for that unknown component, which is also the bundled-asset signal, so extraction silently leaves builtin Wine DXGI beside native vkd3d D3D12. In the reported run, dxgi.dll loaded builtin while d3d12.dll loaded native, then vkd3d_instance_get_vk_instance dereferenced a null instance.

The wrapper cache marker also only tracked the vkd3d version, so changing the companion DXVK version did not trigger re-extraction.

Fix

  • Resolve the configured companion against the shipped DX wrapper manifest and fall back to the supported minimum when it is unavailable (XServerScreen.kt:6145, DXWrapperDownloader.kt:98).
  • Include the resolved DXVK companion in the VKD3D wrapper cache marker so companion changes re-extract the wrapper set (XServerScreen.kt:5786).
  • Use the same resolved version for extraction (XServerScreen.kt:6116).

Evidence

The GameNative support report for Toy Story 3 showed native d3d12.dll, builtin dxgi.dll, and a null dereference in vkd3d_instance_get_vk_instance immediately from d3d12_swapchain_init. The configured companion was 2.7.1-1-gplasync-0, while the shipped manifest contains dxvk-2.6.1-gplasync and no matching package.

Verification

git diff --check passes. Per support-workspace policy, no repository build was run.

Summary by CodeRabbit

  • Bug Fixes
    • Improved VKD3D setup across different graphics drivers by selecting a compatible DXVK version, with fallback options when a configured version is too old or unavailable.
    • VKD3D extraction now refreshes when its associated DXVK version changes, helping ensure the container uses the selected version.