Linux (Proton/vkd3d-proton): console vtables swapped in place break vkd3d-proton's type checks; shared fences hang; the newer retail title then runs at ~0.5 fps #1701

Open
opened 2026-11-26 05:02:05 +00:00 by github-bot · 0 comments
Owner

@⁠EliasTX09 on GitHub · 2026-11-24 19:25 UTC · original

Game and package version: the newer retail game from the README table (, v1.0.2.1)
XCL version: 9e3831e (main, 2026-11-24 18:06), cross-built on Linux with cargo xwin build --release --target x86_64-pc-windows-msvc
GPU and driver: AMD Radeon RX 9060 XT (RDNA4), Mesa/RADV 26.2.6
OS: CachyOS, kernel 7.3.4. Not Windows: Proton Experimental 11.0 (20261027b), started with its wine directly, WINEDLLOVERRIDES=d3d12=n;d3d12core=n;dxgi=n, DXC 1.9.2609, libopus from MSYS2. No network (unshare --net).

I know Linux is not a target (design spec §2). I'm reporting this because people already run XCL under Wine, and three of the four problems below come from one design choice (lpVtbl swapped in place), not from Wine itself.

What happens, in order

  1. vkd3d-proton asserts on the first heap. XCL replaces the lpVtbl of the runtime's own objects (real.rs, the console vtables "under the guard"). vkd3d-proton checks it:
    Assertion failed: iface->lpVtbl == &d3d12_heap_vtbl, file ../src-vkd3d-proton/libs/vkd3d/vkd3d_private.h, line 1077
    Proton's builds keep asserts enabled. I worked around it with vkd3d-proton 3.1 built with -Db_ndebug=true.
  2. The first command list fails with E_INVALIDARG. d3d12_command_allocator_from_iface() (command.c) returns NULL when the vtable is not its own, so Reset logs Invalid command allocator. and the title hits an int3 (rax=0x80070057). Patched locally to skip the vtable comparison.
  3. ExecuteCommandLists crashes at NULL+0x2a80: d3d12_command_list_from_iface() accepts only vkd3d's own command list vtables and returns NULL, and vkd3d_submission_has_query_reset_hazard dereferences that. Patched locally the same way.
  4. A hang after the first presented frame, then the title's watchdog (write to 0 at game+0x2215c35, ~30 s later). The title creates its fences with D3D12_FENCE_FLAG_SHARED. vkd3d-proton makes those d3d12_shared_fence objects and tells them apart from d3d12_fence by vtable (is_shared_ID3D12Fence1). After the swap it treats them as plain fences. Wine logs err:winevulkan:signaller_worker wait timed out with non-empty poll list. The kernel shows no amdgpu timeout. Fixed without any patch by VKD3D_CONFIG=ignore_shared_fence.

After that the title runs through intro and menus without a crash: 169 presents, exit code 0. It is very slow: ~0.5 fps.

Where the time goes (Series X mode, second run)

From sparse windows timing after ~65 s: write-watch 18384 ms (10199799 dirty pages), lock wait 1 ms, chunk scan 101 ms, upload 11355 ms (38664 runs), 42 presents in ~89 s.

Wine's write watch itself looks fine. A test exe under the same Wine (1 GiB, MEM_WRITE_WATCH, GetWriteWatch(WRITE_WATCH_FLAG_RESET) in 16384-entry calls like take_written) reports 262144 pages in 4.7 ms, 0 on the next look, and exactly 4096 after writing every 64th page. Wine logs Using kernel write watches. (userfaultfd). So it is ~18 ns per page in isolation, but ~1.8 µs per reported page in the title.

With device_type = "lockhart" and raytracing = "off" (1920x1080 swap chain) the write-watch time drops (5.9 s / 7.26 M pages after ~94 s), but the upload grows to 54.7 s (98648 runs) in the same time.

Also listed at exit: unimplemented console methods ID3D12CommandAllocator::#9 (70×), ID3D12GraphicsCommandList10::#126, #142, #75 (69× each), #131, #132, ID3D12CommandQueue::#31 (newer layout, 17×).

Suggestions (for the maintainer to judge)

  • Under Wine (under_wine()), XCL could clear D3D12_FENCE_FLAG_SHARED in CreateFence, or document VKD3D_CONFIG=ignore_shared_fence. A small change, and it removes the hang.
  • 1–3 need either objects whose vtable is vkd3d's own (a wrapper instead of an in-place swap) or a vkd3d-proton build without these checks. Happy to test either on RDNA4/RADV.

Not tested

Windows (I have not run this commit there), NVIDIA, other titles under Linux. The vkd3d patches are local hacks to see how far the title gets, not proposed changes.

AI use: the investigation, local patches and this report were done with Claude Code (Claude Opus 5.5) on my machine. I checked the runs and numbers above myself.

report.json and xcl.log of the last Series X run are attached. User names are edited out.

**@⁠EliasTX09** on GitHub · 2026-11-24 19:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/1701) **Game and package version:** the newer retail game from the README table (<package id>, v1.0.2.1) **XCL version:** 9e3831e (main, 2026-11-24 18:06), cross-built on Linux with `cargo xwin build --release --target x86_64-pc-windows-msvc` **GPU and driver:** AMD Radeon RX 9060 XT (RDNA4), Mesa/RADV 26.2.6 **OS:** CachyOS, kernel 7.3.4. Not Windows: Proton Experimental 11.0 (20261027b), started with its `wine` directly, `WINEDLLOVERRIDES=d3d12=n;d3d12core=n;dxgi=n`, DXC 1.9.2609, libopus from MSYS2. No network (`unshare --net`). I know Linux is not a target (design spec §2). I'm reporting this because people already run XCL under Wine, and three of the four problems below come from one design choice (lpVtbl swapped in place), not from Wine itself. ## What happens, in order 1. **vkd3d-proton asserts on the first heap.** XCL replaces the `lpVtbl` of the runtime's own objects (`real.rs`, the console vtables "under the guard"). vkd3d-proton checks it: `Assertion failed: iface->lpVtbl == &d3d12_heap_vtbl, file ../src-vkd3d-proton/libs/vkd3d/vkd3d_private.h, line 1077` Proton's builds keep asserts enabled. I worked around it with vkd3d-proton 3.1 built with `-Db_ndebug=true`. 2. **The first command list fails with E_INVALIDARG.** `d3d12_command_allocator_from_iface()` (command.c) returns NULL when the vtable is not its own, so `Reset` logs `Invalid command allocator.` and the title hits an int3 (rax=0x80070057). Patched locally to skip the vtable comparison. 3. **ExecuteCommandLists crashes** at NULL+0x2a80: `d3d12_command_list_from_iface()` accepts only vkd3d's own command list vtables and returns NULL, and `vkd3d_submission_has_query_reset_hazard` dereferences that. Patched locally the same way. 4. **A hang after the first presented frame, then the title's watchdog** (write to 0 at game+0x2215c35, ~30 s later). The title creates its fences with `D3D12_FENCE_FLAG_SHARED`. vkd3d-proton makes those `d3d12_shared_fence` objects and tells them apart from `d3d12_fence` by vtable (`is_shared_ID3D12Fence1`). After the swap it treats them as plain fences. Wine logs `err:winevulkan:signaller_worker wait timed out with non-empty poll list`. The kernel shows no amdgpu timeout. **Fixed without any patch by `VKD3D_CONFIG=ignore_shared_fence`.** After that the title runs through intro and menus without a crash: 169 presents, exit code 0. It is very slow: **~0.5 fps**. ## Where the time goes (Series X mode, second run) From `sparse windows timing` after ~65 s: `write-watch 18384 ms (10199799 dirty pages), lock wait 1 ms, chunk scan 101 ms, upload 11355 ms (38664 runs)`, 42 presents in ~89 s. Wine's write watch itself looks fine. A test exe under the same Wine (1 GiB, `MEM_WRITE_WATCH`, `GetWriteWatch(WRITE_WATCH_FLAG_RESET)` in 16384-entry calls like `take_written`) reports 262144 pages in 4.7 ms, 0 on the next look, and exactly 4096 after writing every 64th page. Wine logs `Using kernel write watches.` (userfaultfd). So it is ~18 ns per page in isolation, but ~1.8 µs per reported page in the title. With `device_type = "lockhart"` and `raytracing = "off"` (1920x1080 swap chain) the write-watch time drops (5.9 s / 7.26 M pages after ~94 s), but the upload grows to **54.7 s** (98648 runs) in the same time. Also listed at exit: unimplemented console methods `ID3D12CommandAllocator::#9` (70×), `ID3D12GraphicsCommandList10::#126`, `#142`, `#75` (69× each), `#131`, `#132`, `ID3D12CommandQueue::#31` (newer layout, 17×). ## Suggestions (for the maintainer to judge) - Under Wine (`under_wine()`), XCL could clear `D3D12_FENCE_FLAG_SHARED` in CreateFence, or document `VKD3D_CONFIG=ignore_shared_fence`. A small change, and it removes the hang. - 1–3 need either objects whose vtable is vkd3d's own (a wrapper instead of an in-place swap) or a vkd3d-proton build without these checks. Happy to test either on RDNA4/RADV. ## Not tested Windows (I have not run this commit there), NVIDIA, other titles under Linux. The vkd3d patches are local hacks to see how far the title gets, not proposed changes. **AI use:** the investigation, local patches and this report were done with Claude Code (Claude Opus 5.5) on my machine. I checked the runs and numbers above myself. `report.json` and `xcl.log` of the last Series X run are attached. User names are edited out.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:05 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.