Repository navigation
Description
With #92 and #93 merged, unmodified XCL starts under Wine. This is what I measured from there up to current main (956a476), the one thing that stands in the way, and a proposal for it. It is also a partial answer to #154. I'd like to know which direction you would accept work on before writing any.
Setup
- Linux, kernel 7.0, Wine 11.21 (Staging), in a container.
- GeForce RTX 5060 Ti (32-lane waves) and an AMD iGPU (RADV, Mesa 25.2.8, 64-lane waves, mesh shaders).
- vkd3d-proton: release 3.1, and
masteratcae8353. - DXVK 3.1.1 for
dxgi.dll,d3d11.dll,d3d10core.dll, as Proton pairs them.
Result
Test title, xcl run <testgame> -- --hello:
| vkd3d-proton | AMD (RADV) | RTX 5060 Ti |
|---|---|---|
| release 3.1 | 6 [PASS], then Assertion failed: iface->lpVtbl == &d3d12_heap_vtbl (vkd3d_private.h:1077) |
not run |
master |
the same assertion | not run |
master, identity checks relaxed (below) |
47 [PASS], 2 [FAIL] |
47 [PASS], 2 [FAIL] |
With the checks relaxed every D3D12.X check passes on both GPUs (triangle, PresentX, DMA queue and page pools, list memory methods, sparse VRAM heaps, ring-buffered uploads, depth bias, the ray-tracing surface, DirectStorage, textures in title memory and in a streaming pool). Unchanged through 66e8e97.
cargo test -p xcl --lib on the AMD GPU at 66e8e97: 373 passed. The failures are two from my packaging (tests/data/llvm-amdgpu not next to the test binary), three of Mesa's compiler (one is the ds_bpermute case below), one Wine error-code difference (get_proc_address_and_load_library_ex_reject_null_name), and frame::tests::statistics_name_each_frames_origin_…, which is timing-dependent here (it failed in 2 of 3 runs on one build and 2 of 3 on another). On the RTX 5060 Ti at 60599a9: gpu:: 222 passed, 2 failed (packaging), 2 SKIPPED … no wave64. With a retail shader pack and console DLLs (XCL_SAMPLE_RPF, XCL_SAMPLE_DLLS): gpu_pso_e2e 6 of 6 ("MS + PS pipelines through the hook: 7 / 7") and gpu_compute_e2e pass on both GPUs. The BVH builder tests fail on both without #146 and pass with it (an argument-placement fault in XCL, not a Linux matter).
A retail game on 956a476, same setup, both GPUs: the same as you report on Windows. After its load it presents a steady 30 fps (4,500 presents in 197 s on the RTX 5060 Ti, 4,200 on the iGPU), image black, no abort in 200 s. That needs the relaxed vkd3d-proton, and one more thing outside XCL's design (the shared fences below).
The ds_bpermute failure (gpu_format_stores_atomics_global_lds, "lane 0 ds_bpermute", left 1280, right 63) is RADV's: it passes with RADV_DEBUG=llvm and on NVIDIA. ACO's emit_bpermute_shared_vgpr puts its two shared VGPRs at align(num_vgprs, 4); this kernel uses all 256, so they come out as v0 / v1 and the index is overwritten (Mesa 25.2.8, RDNA2). Nothing for XCL to do.
The obstacle: vkd3d-proton recognises its objects by vtable pointer
XCL replaces the vtable pointer of host objects with its extended table (real.rs, adopt). vkd3d-proton compares that pointer with its own tables:
- eleven
assert(iface->lpVtbl == &…_vtbl)in theimpl_from_*helpers. They are compiled into the official release, so this is what a Proton user gets. d3d12_command_allocator_from_ifacereturns NULL for an allocator whose table is not its own.d3d12_command_list_from_iface(used byExecuteCommandLists) returns NULL for a list whose table is not one of its seven; the caller then reads through it (an access violation at address0x2b20).- one place dispatches on it:
is_shared_ID3D12Fence1picks between two different fence structures by comparing the vtable withd3d12_shared_fence_vtbl. A retail game creates its fences withD3D12_FENCE_FLAG_SHARED. With XCL's table in place the shared fence is handled as an ordinary one: the queue'sSignalreachesd3d12_fence_lockon a structure with no mutex at that place, the queue's submission worker blocks for good, the fence never advances, and the game's own watchdog ends it about 30 s later. With assertions on, the assertion beside that check fires instead.
The 47 and the 30 fps above are with vkd3d-proton built with -Db_ndebug=true and the two from_iface functions changed to accept any table (about ten lines), and, for the shared fences, with the sharing bits cleared before CreateFence (VKD3D_CONFIG=ignore_shared_fence does the same). All of that is diagnostic: it removes checks for every application, or works around the replaced table rather than fixing it. Nothing vkd3d-proton could ship, and nothing I would propose as a PR.
This is not only a Linux matter. Microsoft's runtime treats the vtable pointer as state too: per HANDOFF (#75), Agility 1.620+ swaps a list's vtable on Close / Reset, and real::preserve_vtable / readopt chase it at eight call sites on current main (list_x.rs, real.rs, device_x.rs). The count of internal slots after the public ones also had to be probed per runtime (device 125 vs 104, queue 42 vs 19). Every new D3D12 runtime can move either. An object the host never sees modified has neither problem.
And the caller test can pick the wrong method. A slot whose console method differs from the PC one is split by return address (guard::pick). A title function that the system calls directly, and that ends in a tail call to such a method, has a system DLL as its return address, so the PC method runs with the console's arguments. I added a check to the test title to see it: a thread start routine that is mov rax,[rcx]; jmp [rax+72] on a descriptor heap (slot 9, GetCPUDescriptorHandleForHeapStart: RAX on the console, a hidden pointer on the PC):
[FAIL] D3D12.X: a console method by tail call from a system callback (thread start): the PC method ran: returned 0x1686030 (the console handle is 0x1445fe0, the spare buffer is at 0x1686030) and wrote 0x1445fe0 through rdx
Measured under Wine; the split is XCL's own code, so I expect the same on Windows but have not run it there. Thread entry points, thread-pool work items and task-queue callbacks are where a title can hit this: compilers emit exactly this jump for return obj->Method(...); at the end of a function. With proxies the question does not arise: whoever calls through the title's object gets the console method.
Proposal
Proxies, one kind of object at a time. title_list.rs already gives the title a console-shaped list with a thunk per slot and the PC list behind it. The same shape for the other kinds leaves host objects untouched: the title holds the proxy, object arguments are unwrapped on the way in, returned objects are wrapped on the way out, and the caller-based guards are not needed on that path because the host never calls through a proxy. Starting with command lists would remove preserve_vtable on Windows and one group of assertions on Linux in the same step; fences next would make the shared-fence case above work as it is. Each further kind is a separate, reviewable change. Linux needs all fifteen before stock vkd3d-proton works; Windows gains with each.
The alternatives I considered and would not propose as PRs: a documented, relaxed vkd3d-proton build for Linux users (works today, but it removes checks for every application), and an opt-in switch in vkd3d-proton to skip identity checks (I expect them to decline, with reason: the checks are right, and the fix belongs with whoever changes the objects).
Would you take proxies if they came in small steps with tests, each checked on Windows by you before merge? I would start with command lists.
Other things a Linux user will meet
userfaultfdmust be allowed. Wine Staging tracksMEM_WRITE_WATCHwithuserfaultfdwrite protection and falls back to read-only pages when the call is refused. In the fallback,OpenExistingHeapFromAddresson a window that has not been written yet cannot import the pages; vkd3d-proton then gives the heap memory of its own and still returns success. CPU and GPU each see their own copy and shaders read zeros (gpu_unified_memory_arena: "s_load from process memory", left (0, 0)). Docker's default seccomp profile refuses the call; with it allowed everything above holds. With it refused the test title drops to 40[PASS], 9[FAIL].- DXVK's DXGI and Direct3D 11 are needed next to vkd3d-proton. With Wine's own
dxgi.dll,PresentXcrashes inwined3d.dll; with DXVK's DXGI but Wine'sd3d11.dll, a later check stops inDXGID3D10CreateDevice. - The two
[FAIL]s:xmem: working-set statistics(limit0x360000000, used0x0) anduser32: … hidden console screen: W: not cloaked. Wine differences; not looked into. - In the test title, after the last graphics check the run ends in Wine's
xaudio2_9.dllwhen the mastering voice is created; my container has no audio device. - Once in about ten runs on RADV:
radv/amdgpu: The CS has been rejected (-1), after which the device is lost. Not reproduced on demand.
I can rerun anything on both GPUs.
AI-assisted.
🤖 Generated with Claude Code
Activity
martinchooxp commentedon Nov 23, 2026
How did you build the project on linux ?. Did you use a VM ?
ozimchuk commentedon Nov 23, 2026
No VM. I cross-compile XCL for Windows on Linux and run the
.exeunder Wine.Build (Ubuntu 24.04, in a Docker container, but a plain Linux setup works the same):
gcc-mingw-w64-x86-64,g++-mingw-w64-x86-64) and Rust with thex86_64-pc-windows-gnutargetCARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc-posix(the POSIX-threads variant)cargo build --release --workspace --target x86_64-pc-windows-gnu. Since VFS hooks: the guard keeps the thread's last error #92 and Loader: under Wine, PEB.ImageBaseAddress keeps the real main image #93 this builds unmodifiedmain. The tests build withcargo test --release --workspace --no-run --target x86_64-pc-windows-gnu, and the test.exes run under Wine too.dxcompiler.dll,dxil.dll) next toxcl.exe.Run: Wine 11.21 (Staging), with vkd3d-proton as
d3d12.dll/d3d12core.dlland DXVK'sdxgi.dll,d3d11.dll,d3d10core.dll, all next toxcl.exe. The GPU is the host's own Vulkan driver (NVIDIA's, or Mesa's RADV for AMD), so no passthrough is needed. Two caveats from the issue above: stock vkd3d-proton stops on its vtable-identity assertions, so my runs used a relaxed diagnostic build; anduserfaultfdmust be allowed (Docker's default seccomp profile blocks it).Kalmarv commentedon Nov 23, 2026
An addition to the
userfaultfdnote above, from a plain Ubuntu 24.04 VM (no container) with an RTX 2060 (Turing), NVIDIA 595.91.07, atmain956a476, cross-built forx86_64-pc-windows-gnu. The stack is Kron4ek's Wine 11.21 Staging (wow64 build), vkd3d-protonmaster30b0eb9 relaxed as described above, and DXVK 3.1.1dxgi.On this stack five
gpu::recomptests read zeros from title memory, onmainand on #191's branch:gpu_memory_windows_above_4_gib,gpu_unified_memory_arena,gpu_mesh_mode_reads_memory_windows,gpu_bvh64_intersect_ray_across_memory_windows_and_grazingandgpu_sparse_vram_descriptors_buffers_and_xmem. For example,gpu_unified_memory_arenafails with "s_load from process memory", left(0, 0).The cause is the one you describe, but this setup reaches it without any seccomp profile.
userfaultfdwrite-watch code is a Proton Wine patch (dlls/ntdll/unix/virtual.cin ValveSoftware/wine). The Wine Staging build I used doesn't have it: itsntdll.socontains nouserfaultfdcode, and Kron4ek'sstaging-tkgbuild doesn't either.strace -e userfaultfdover a test run shows no such call at all. With such a Wine,MEM_WRITE_WATCHmemory always takes the read-only-page fallback, whatever the host allows.OpenExistingHeapFromAddress→vkd3d_import_host_memorylogsFailed to import host memory, hr 0x8007000e(VKD3D_DEBUG=warn). It then allocates host-visible memory of its own and still returnsS_OK(libs/vkd3d/memory.c). The CPU and the GPU each see their own copy.MEM_WRITE_WATCHset to 0 ingpu/uma.rs, same binary otherwise, same GPU and stack. Then 4 of the 5 pass:gpu_memory_windows_above_4_gib,gpu_unified_memory_arena,gpu_mesh_mode_reads_memory_windowsandgpu_bvh64_intersect_ray_across_memory_windows_and_grazing. Unchanged, all 5 fail.gpu_sparse_vram_descriptors_buffers_and_xmemstill fails without write watches: "submit 1 lane 0 mismatch", left 0, right 1077. vkd3d-proton logs no import warning any more. It reads through the sparse VRAM windows as well, so this is a second, separate cause that I haven't identified.What this means for a Linux user: a Wine that tracks write watches with
userfaultfdis needed, besides the host allowing the call. Proton's code passesUFFD_USER_MODE_ONLY, so it should work with Ubuntu's defaultvm.unprivileged_userfaultfd = 0, as long as no seccomp filter blocks it. I couldn't confirm that here: GE-Proton 11-14's Wine needs 32-bit libraries this machine doesn't have. Since vkd3d-proton reports success, nothing in XCL notices today. A start-up check could catch it: write a word through the CPU, read it back through the GPU.Not covered: a Proton Wine run on this machine; the sparse-VRAM failure's cause; AMD; the test title and the e2e binaries.
BlestTerror commentedon Nov 23, 2026
Another data point, from a different setup: Arch Linux, Wine 11.20, vkd3d-proton 3.1, DXVK 3.1.1, RTX 4060 (Ada), driver 615.78.08,
mainatdb5dc26.Build: besides mingw, the MSVC target cross-compiles with
cargo-xwin(cargo xwin build --workspace --target x86_64-pc-windows-msvc). One snag:libudis86-syspasses the gcc-style-includestring.h, whichclang-clignores, soudis86.cfails on an undeclaredmemset; aclang-clwrapper that adds/FIstring.hfixes it. DXVK reports an NVIDIA GPU as AMD by default;DXVK_CONFIG='dxgi.hideNvidiaGpu = False'keeps XCL's NVIDIA paths.cargo test -p xcl --lib(serial): the same picture as yours (the vtable assertion stops the run atgpu_sparse_vram_descriptors_buffers_and_xmem, plus the Wine error-code / timing differences), and one you did not hit on the 5060 Ti:gpu_more_atomics_sub_dword_scratch_valuhung the GPU (NVRM: Xid 109, CTX SWITCH TIMEOUT; XCL: "GPU fence still pending after 10000 ms"), and the device was lost for every GPU test after it.That one is a vkd3d-proton (dxil-spirv) bug, not XCL's: a
RWByteAddressBufferused with 64-bit atomics carries only the{ Atomic64Use, 1 }extended property, dxil-spirv read that1as a structured stride, and its BDA (root descriptor) loads / stores on that buffer then added theundefelement offset to the address. It shows up when a load from the buffer feeds a 64-bit atomic on it, e.g. thermw64compare-exchange loop forGLOBAL_ATOMIC_INC_X2/DEC_X2. Whetherundefcomes out as 0 depends on the driver, which would explain why the 5060 Ti passes.Fix: HansKristian-Work/dxil-spirv#372. With vkd3d-proton 3.1 rebuilt on it, the test passes and the serial run reaches the vtable assertion with no failures and no Xid. Nothing to change in XCL.
D3D12.X: check at start-up that the GPU sees CPU writes to unified me…
Kalmarv commentedon Nov 23, 2026
Correction to my comment above: there is no second cause.
gpu_sparse_vram_descriptors_buffers_and_xmemhas the same single cause as the other four.My experiment,
MEM_WRITE_WATCH= 0 for all ofgpu/uma.rs, also turned off XCL's dirty tracking for the sparse windows:hle/d3d12x/sparse.rsuploads only whatGetWriteWatchreports. So that test read zeros because of the experiment itself.The narrower experiment, at
main6da33fa, removes write watch only from the runtime's coherent window (uma.rs:182) and keeps it on the sparse windows. There,gpu_sparse_vram_descriptors_buffers_and_xmempasses, 3 of 3, with no import warning from vkd3d-proton.A standalone repro (
OpenExistingHeapFromAddresson a committed block, a CPU write, a GPU copy back; no XCL involved) shows the condition exactly. Same RTX 2060, Wine 11.21 Staging and vkd3d-proton as above:MEM_WRITE_WATCHcommit, 512 MB or 1 MBFailed to import host memory, hr 0x8007000eMEM_WRITE_WATCHreservationOnly write watch on the imported memory itself matters. XCL needs write watch there:
title_textureswatches the coherent window too. So this isn't something XCL can drop. It needs a Wine withuserfaultfdwrite watches (Proton's), as described above.AI use: Claude Code, Claude Opus 5.5
BlestTerror commentedon Nov 23, 2026
A data point on the write-watch import: on upstream (non-Staging) Wine 11.20 (Arch's
winepackage), withvm.unprivileged_userfaultfd = 0, the five memory-window tests pass (gpu_memory_windows_above_4_gib,gpu_unified_memory_arena,gpu_mesh_mode_reads_memory_windows,gpu_bvh64_intersect_ray_across_memory_windows_and_grazing,gpu_sparse_vram_descriptors_buffers_and_xmem), withVKD3D_DEBUG=warnand noFailed to import host memory. Also in full serial--libruns. RTX 4060, vkd3d-proton 3.1 (+ dxil-spirv#372, relaxed as above),x86_64-pc-windows-msvc,main6da33fa.So the read-only fallback looks like Wine Staging's write-watch path specifically; upstream Wine's
MEM_WRITE_WATCHmemory imports fine here. A Linux user may not need Proton's Wine, just not Staging. I haven't run your standalone repro here; happy to if you share it.Kalmarv commentedon Nov 23, 2026
A correction to my notes above, prompted by @BlestTerror's result. The
userfaultfdwrite-watch code is in upstream Wine, not only in Proton's:dlls/ntdll/unix/virtual.catwine-11.20andwine-11.21, built asUSE_UFFD_WRITEWATCH. It only compiles when the build's kernel headers haveUFFD_FEATURE_WP_ASYNCandPM_SCAN_WP_MATCHING, both from Linux 6.7. Kron4ek's portable builds are compiled in an Ubuntu 18.04 chroot (CHROOT_DISTRO="bionic"increate_ubuntu_bootstraps.sh), so those builds lack it. A distro Wine built against current headers, such as Arch's, has it, and the five memory-window tests pass there. What a Linux user needs is a Wine built withUSE_UFFD_WRITEWATCH, running on a 6.7+ kernel.vm.unprivileged_userfaultfd=0doesn't matter, because the call passesUFFD_USER_MODE_ONLY.Tested: upstream source at both tags; Kron4ek's build script;
ntdll.soof Kron4ek 11.21 Staging (nouserfaultfdcode, no such syscall understrace).Not tested: a Wine built here with
USE_UFFD_WRITEWATCH.🤖 Claude Opus 5.5
notdxbi commentedon Nov 23, 2026
Another Linux data point, on current
main(af20b4b), where the README says the retail game reaches its first menu (the account prompt) on the RX 9070.Setup: Nobara 44 (Fedora-based), kernel 7.3, RTX 5060 8 GB, NVIDIA 595.112.07, Ryzen 7 5700X, 32 GB. Wine 11.22 Staging (
vm.unprivileged_userfaultfd = 0;gpu_unified_memory_arenapasses anyway). XCL cross-built forx86_64-pc-windows-gnuwith Fedora's mingw64 (posix threads) in a rootless podman container. vkd3d-protonmaster30b0eb9, relaxed as described in this issue (-Db_ndebug=true+ the twofrom_ifacechanges),VKD3D_CONFIG=ignore_shared_fence. DXVK 3.1.1dxgi/d3d11/d3d10core, DXC 1.9.2609.XCL_NETWORK=0.Tests at
956a476: lib 531 passed / 4 failed (Wine error codes inget_proc_address_and_load_library_ex_reject_null_nameandvfs::truncate_existing_validation_errors,vfs_hooks::move_case_only_and_self_rename_preserve_file, andlegacy_console_iids_map_to_their_own_slots, which #200 addresses). 2 SKIPPED (no wave64). WithXCL_SAMPLE_RPF/_DLLS/_TTPF:gpu_pso_e2e6/6 andgpu_compute_e2e2/2.console_dlls_e2e11/12 (memory_cap_is_active: Wine has no job memory limit). Test title: 48 PASS, 2 FAIL (the same two as above).Retail game,
af20b4b, 300 s and 600 s runs:XCL_FRAME_DUMP, every dumped frame from ~frame 300 on is black except one 1-pixel diagonal line from the bottom-left to the top-right corner: the shared edge of a full-screen quad's two triangles. 0.12 % of pixels are non-zero, the same in every frame up to 600 s. So the full-screen composite runs, but the image it reads is black everywhere except along that edge.compiling shaders: 0 running, 0 done, 57817 pipelines queued(warm DXIL cache; the queue is the lazy pipelines, so this alone is expected).Write64BitValueBottomOfPipeX: … is not 8-byte aligned in unified memory.At
956a476the same setup gave all-zero frames (no seam) and the title never openedaudio.rpf,textures.rpf,script.rpf,pack/*or thettdbarchives in 300 s. 399 of 450 title textures stayed all zero, and its job workers sat idle after the pipeline phase. That matched what was reported on Windows.A side note on the Wine path: the 4
Write64BitValueBottomOfPipeXwarnings are timestamps (list_x.rstimestamp()) into the title's own memory, not misaligned addresses (e.g.0x…6698). Unlikewrite(),timestamp()has nocpu_writesfallback, so those are dropped. The message reads as an alignment problem but covers "not in unified memory" too. Probably harmless, just noting it.Whether the seam-only image is NVIDIA-specific (wave32 / split wave64 VS / PS) or Wine-specific, I can't tell from here. If anyone has the menu on NVIDIA under Windows at
af20b4b, that would separate the two. I can rerun with anyXCL_*trace.AI-assisted.
notdxbi commentedon Nov 23, 2026
Follow-up to my comment above, now on
main60565c4(with #199). Same Linux / Wine / RTX 5060 setup. I localised the black image withXCL_DEBUG_MAGENTAandXCL_TRACE_FRAME:vs 7fda1be8fbc78299 / ps c1d5a4b8b07ccbceis the full-screen composite into the presented target. Forced to yellow, the whole screen is yellow, so the composite and PresentX are fine.vs d2a238740e50f037 / ps e2bcc91e569d6d13is a full-screen pass into the target the composite reads. Forced to blue, the whole screen is blue.vs 28d887aa04ffa15a / ps b40d9ca24fe3d23dis the menu's element draw: ~19 draws a frame into that same 3840×2160 target, topology 4 (triangle list, not a rect list), vertices pulled through a V# in its root table (e.g.[4dbcdc00, 4, 600, 31016fac]). Forced to magenta, it covers only the 1-pixel diagonal from the bottom-left to the top-right corner. Every element's triangles are degenerate along that line, the same in every frame (16 000+ frames over 600 s). It's unchanged by D3D12.X: rect lists drawn whole through a generated geometry shader #199, which fits: these aren't rect lists.So the composite chain works on NVIDIA under Wine. What's wrong is the positions coming out of VS
28d887aa04ffa15a(or the data it reads). On the RX 9070, where the menu shows, the same VS runs natively as wave64; here it's the 32-lane form. That makes the wave64 VS path (upper_lanes/ spill slots) my first suspect, but I haven't proven that it isn't the Wine side.Checked and ruled out on the Wine side: Wine 11.22 Staging calls
userfaultfdwithUFFD_USER_MODE_ONLY(flags0x80801) and logs "Using kernel write watches", sovm.unprivileged_userfaultfd = 0doesn't push it onto the slow fallback. The sparse-window write-watch scans are still slow, though (up to 5.7 s for 332 825 dirty pages).If someone with NVIDIA on Windows can say whether the menu shows at
60565c4, that would settle NVIDIA vs Wine. I can runXCL_DEBUG_PS_EXPR/XCL_DUMP_SHADERSon that VS if a specific output would help.AI-assisted.
jvyden commentedon Nov 23, 2026
With the patch described here and in #257 I'm able to independently confirm GTA VI booting on Linux! Starts to a black screen with what looks like the outline of a quad, I'm unsure if it gets farther yet though.
FilipeSilvens commentedon Nov 23, 2026
A Linux data point: the retail game's menus draw under stock vkd3d-proton, with the identity problem handled on XCL's side instead of in vkd3d-proton.
Setup: Nobara 44 (kernel 7.3), RTX 4070 Ti (NVIDIA 620.70, 32-lane waves), Ryzen 7 5800X. GE-Proton11-1's Wine and its bundled vkd3d-proton 3.1.0, unpatched (built without the assertions). XCL cross-built for
x86_64-pc-windows-gnuat6da33fa,XCL_NETWORK=0.Three local changes in XCL, no vkd3d-proton patch:
real::pc_view: under Wine only, an adopted command allocator or list gets vkd3d-proton's own vtable back for the length of the PC calls that check it (CreateCommandList(X), both Resets, ExecuteCommandLists), and XCL's afterwards.CreateFencedrops the sharing bits. GE-Proton's vkd3d-proton 3.1.0 has noignore_shared_fence; without this change the game crashed ind3d12_shared_fence_set_native_sync_handle_on_completion_explicitabout 15 s in.Result: first frame at ~18 s, a steady 30 fps, and a 300 s run without a crash. The account prompt and the whole Settings menu draw (screenshot below). A DualSense works after setting
DisableHidraw=1underHKLM\System\CurrentControlSet\Services\winebus; otherwise Proton's Wine passes it through as raw HID and XInput sees nothing.@notdxbi @jvyden: this is NVIDIA with 32-lane waves too, so the black image with the diagonal is probably not XCL's wave64 VS path on NVIDIA by itself. The main difference from your setups is the relaxed
from_ifacelookups versus vkd3d-proton seeing its own vtable during the call. I haven't checked whether other vkd3d-proton code still branches on the vtable after the relaxed lookup, so that part is a guess.With #283 on top, the intro movie plays here as well. Like notdxbi, I see the sparse-window write-watch scans grow under Wine (392 ms → 1662 ms between 35 s and 52 s, ~320k dirty pages each time), which pulls the frame rate down. Not looked into yet.
These are workarounds of the same kind as the ones in this issue; proxies remain the real fix. If an interim fix is wanted, I can open the first two changes as a small draft PR, and the fence change as a separate one.
AI-assisted: Claude Code (Claude Opus 5.5) found the causes, wrote the changes and this comment. The runs were real, on the hardware above.
notdxbi commentedon Nov 23, 2026
@FilipeSilvens @jvyden – agreed, the diagonal is not the wave64 VS path. I found what it is on my setup, plus three more things between the menus and a playable window. Same box as before (Nobara 44, RTX 5060, NVIDIA 595.112.07, Wine 11.22 Staging, relaxed vkd3d-proton
master30b0eb9, DXVK 3.1.1 dxgi). XCL ismain0e946cfplus the four local changes below. Patches are uncommitted; I can open them as separate PRs if wanted, butscripts/smoke.ps1needs Windows.1. The diagonal: CBV descriptors have stride 0 (
real.rsdev_create_cbv_x→buffer_words(va, 0, size, 22))28d887aa04ffa15areads its 2D transform rows withbuffer_load_dwordx4 v[0:3], v[0:1], s[0:3] idxen. The row index is COLOR1.z × 1020.04 + 2.1 / + 3.1, and the V# comes from its table:[4dbcdc00, 00000004, 00000600, 31016fac], which is exactly the CBV encoding.x = yfor every vertex and the whole UI lands on the diagonal. The vertex data and input layout check out (COLOR0 / COLOR1 RGBA8, POSITION0 R32G32_FLOAT, stride 16, sensible positions, viaXCL_TRACE_SHADERS).desc::cbv_words= stride 16, num_records = ceil(size / 16). The emitter's scalar-load limit is num_records × stride, sos_buffer_loadkeeps the same byte bound.6da33fahas the same stride-0 CBV and the same idxen addressing in the emitter, so I can't explain from here why your menus draw without it. If you can runXCL_TRACE_FRAME=1 XCL_TRACE_SHADERS=28d887aa04ffa15aand compare the table's V# words, that would settle it.2. A white window in front (Linux only): the title's window is not cloaked under Wine
hle/user.rs): afterDWMWA_CLOAK,DWMWA_CLOAKEDis checked. If the window isn't cloaked it is hidden and kept hidden (WM_WINDOWPOSCHANGINGdropsSWP_SHOWWINDOW). No change on Windows.3. Then a black XCL window: the swap chain on the title's queue gets nothing
CopyResourceandCopyTextureRegionalike), while the title's image had 517 542;d3d12x/present.rs, Wine only): the presenter makes its own direct queue. The title's queue signals a fence, and the presenter's queue waits on it, copies and presents.4. #298's crash (
+0x13936) looks like a race inkernelx/lazy.rs; I'll add a comment therehandler→commitremoves the page fromLAZYbefore committing it. The second thread to fault on the page finds it no longer lazy, getsEXCEPTION_CONTINUE_SEARCH, and the title's first store into a new pool object crashes.ensure(DirectStorage destinations) races the same way.a_fault_that_raced_the_commit_goes_ondrives the handler with the losing thread's fault. It fails without the change and passes with it. Not verified in-game yet; this comment gets an edit when it is.Tested (Wine, RTX 5060)
gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.gpu_f64_math_random(all-zero results, 1 of 3 isolated runs) andgpu_built_bvh_nodes_match_the_cpu_node_test(1 run).mesh_dispatch::tests::gpu_*/paired_*hang the RTX 5060 (NVRM Xid 109 CTX SWITCH TIMEOUT, then device lost; every later GPU test fails as fallout).Not tested: Windows (none of this was run there), AMD, the in-game effect of 4.
AI use: Claude Code (Claude Opus 5.5) found the causes, wrote the changes and the tests, and wrote this comment; the runs were real, on the hardware above.
wiktorekdev commentedon Nov 23, 2026
A Linux data point past the menus: the retail game reaches its loading screen and stays on it.
Setup: EndeavourOS (kernel 6.18 LTS), RTX 4070 12 GB, NVIDIA 620.70.06, Ryzen 5 7600X, 30 GB. Proton Experimental's Wine, a relaxed vkd3d-proton,
XCL_NETWORK=0, run inside a network namespace with no network. XCL built forx86_64-pc-windows-msvcfrommain0e946cfwith #273 and eight commits from theaustinayers'modified-build: the DirectStorage destination fixes (landed as #289), the lazy-page race, write-watched GPU-visible memory, rect-list corners, bounded pipeline waits, and #283.Local changes on top (not proposed; listed so the result can be judged):
to_zeropruned once per submit, as in Retail title reaches its title screen and menus: GPU title memory in large pages, to_zero pruned once #203. Without it, the title stopped at 2.6 s insidedecommit_tileshere.CUSTOMheap past ~500 MB). Without it, the Series X profile went past 11 GB on a 12 GB card.int3atgame_scarlett_master.exe+0xcc2834is stepped over. It is hit once at start-up; not investigated.Result: accessibility, language, settings and legal screens, then the loading-screen artwork at a steady 30 fps (screenshot). The run goes past 500 s with no crash, ~10 GB of video memory, and no DirectStorage failures.
Where it stops:
0 running, 0 done, 58746 pipelines queued; the PSO workers wait on an empty queue.WaitForSingleObject(+0x2250c0, called from+0x2431600) between frames. The render thread presents normally (wait_frame_event_x).CreateTicketXbl3), answered with "no Xbox Live" every ~16 s, then with growing gaps (153 s, 260 s, 400 s).So the title seems to wait on a condition that never becomes true, not on XCL. VIctory's README reports this step taking about 50 s, so it is passable. I haven't found the condition yet. If anyone got past the loading screen with XCL, which runtime areas were served differently would narrow it down.
Not tested: Windows, AMD, the Series S profile at this stage.
AI use: Claude Code (Claude Opus 5.5) did the investigation, the local changes and this comment. The runs were real, on the hardware above.
FilipeSilvens commentedon Nov 23, 2026
@notdxbi ran it:
XCL_TRACE_FRAME=1 XCL_TRACE_SHADERS=28d887aa04ffa15a, 60 s on the account prompt, same Linux setup as above. Two XCL builds:6da33fa+ the three Proton changes, and9ab7d76(which includes7a033c8) + the same changes + #283 + #273.All 24 traced draws of
vs 28d887aa04ffa15a / ps b40d9ca24fe3d23d, on both builds, have this in slot 0 of their table (the base address in word 0 changes from draw to draw):0x60= 96 rows of 16 bytes = 1536 bytes, the same size as yours.0x0002403c. XCL's encoder (desc::buffer_words) always writes0xFAC | format << 12 | 1 << 24 | oob << 28there, which for stride 0 and format 22 is exactly your0x31016FAC. So yours came from XCL'sCreateConstantBufferViewpath (real.rs,dev_create_cbv_x), and here the title wrote the descriptor itself, in the console's format.So the same title on the same version reaches this draw by two paths: it writes the V# itself here, and it calls XCL's CBV creation on your setup. The title's own descriptor uses stride 16, which backs your fix. I don't know yet what makes it pick the other path on your side.
7a033c8isn't it (same result with and without it). Your four local changes, Wine 11.22 Staging vs GE-Proton11-1, or the relaxed vkd3d-proton are what's left.AI-assisted: Claude Code (Claude Opus 5.5) ran the traces, read the descriptor words and wrote this comment. The runs were real, on the hardware above.
8 remaining items
ozimchuk commentedon Nov 23, 2026
The diagonal: #335 makes XCL's constant buffer views stride 16 (num_records = size / 16), as the title writes this descriptor itself (@FilipeSilvens' trace above). It is the same change as @notdxbi's item 1; details and measurements are in #307 and #335.
For Linux setups that want to try it before it is merged, our fork's
linuxbranch hasmainplus this change and two local stopgaps:ignore_shared_fenceis not needed;XCL_PC_VIEW=1, the vtable hand-back for unmodified vkd3d-proton. It covers @FilipeSilvens' calls plus the consoleResetX, which needs it too.Branch: https://github.com/ozimchuk/xcl/tree/linux. The stopgaps are not for upstream; proxies remain the fix.
AI-assisted (Claude Code, Claude Opus 5.5).
D3D12.X: constant buffer views are float4 rows (stride 16), not raw b…
bKNNNNN commentedon Nov 24, 2026
Follow-up on the illustrated loading screen from the RTX 5080 report above. Tested on XCL commit
3516080d53daac0f7749b5c02bc9b1e371479557, under Proton Experimental with networking disabled. Newer commits have landed since this run.At 145 s and 180 s, the guest entry thread had the same stack, with a return site at guest module offset
+0x56a0d. The Wine relay trace showed one outstandingWaitForSingleObject(handle, INFINITE)at that site. Querying the handle type during the wait withNtQueryObject(ObjectTypeInformation)returned Semaphore. The wait had no recorded return before the timed stop at 190 s. XCL continued presenting at 30 FPS through the final sampling interval (2,914 frames shown in total). The furthest screen observed was the loading artwork.The producer that should release the semaphore is still unknown. A matching stack and object type from another setup would help establish whether we are seeing the same wait.
AI-assisted local diagnostic (OpenAI Codex).
notdxbi commentedon Nov 24, 2026
Update from my side, now on
maina6f5f7a(so #335 / CBV stride 16, #283, #244, #288 and #294 are upstream; thanks @ozimchuk for taking item 1 in). Same box: RTX 5060 8 GB, NVIDIA 595.112.07, Wine 11.22 Staging, relaxed vkd3d-proton, DXVK 3.1.1 dxgi.1. The 5 fps intro video / loading screen is CPU detiling. With faster detiling it runs at 22–29 fps here.
I timed
title_textures::refreshper 5 s during the video (A pressed at the account prompt). Before:Change (
gpu/tiling.rsonly, +~150 lines with tests), in the same direction as @gw1337x's diff on #283:Chain::detile_levelsplits the rows of a level of ≥ 256 K elements acrossavailable_parallelism / 2threads (max 8).offset_z(block column bytes, in-block x bits) are worked out once per level and the y terms once per row, so the inner loop isrow_base + col[x] + (col_xor[x] ^ row_xor).srcuse fixed-size copies; linear levels (the video planes, mode 0) are copied a row at a time (gw1337x's idea).detile_matches_element_atcompares withelement_atper element: modes 0 + all 14 tiled modes, 1 / 4 / 16-byte elements, a height that doesn't split evenly, a short source, mip-tail levels and slice 1.Same timing afterwards: ~2.1 GB detiled in ~1.9 s per 5 s (≈ 1.1 GB/s). The video phase went 5 → 22–29 fps (
frames presentedover 300: 23.1 / 22.0 / 29.4 / 26.8).2. The tiling tables were rebuilt for every placed texture.
CreatePlacedResource → title_textures::register → xg::Texture::with_pipes → Surface::new → tiling::Layout::from_bits.from_bitsrebuildsox/oy/ozand the "high" tables (up to 3 × 8 192 entries) each time.from_bitsis memoized per (mode, element size, block bits, pattern, dims).3. @gw1337x: your
Uploaderdiff (#283, 23:30) does not work as-is on top of #288.upload_all; I kept D3D12.X: back kept-in-step title textures by shared VRAM pages (#248) #288'svram::before_execute(&queue)in front of both paths.title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels("reactivated unmapped texture remapped cleanly" reads zeros),title_textures::tests::transitions_apply_when_their_list_is_submittedandvram::tests::d32s8_targets_take_their_own_size_of_video_memory.XCL_SYNC_UPLOADS=1, so D3D12.X: back kept-in-step title textures by shared VRAM pages (#248) #288's paths seem to rely on the upload being finished whenupload_batchreturns. I took the Uploader out again.4. What's left after the video, sampled the same way (15 dumps, 3 s apart, symbols from the build):
+0x56a0d, which matches @bKNNNNN's semaphore wait);texture::wait(the synchronous upload wait);res_releaseof the upload staging;refresh;So an async uploader that fits #288 would help the streaming phase, but the long stop is the title's own wait.
5. Sound under Wine: Fedora's
mingw64-opus(libopus 1.6) gives alibopus-0.dllthat #294 picks up next toxcl.exe(imports only KERNEL32 / msvcrt). The run logsOpus packets decoded (0 errors)with non-zero samples.6. Still needed under Wine, not upstream:
Without those, the XCL window here is white, then black. I can open these two as PRs (Wine-only,
util::under_wine()), butsmoke.ps1needs a Windows box.Tested: on
a6f5f7a+ my changes:--skip gpu::, 4 threads: 364 passed, 0 failed, 3 ignored;gpu::, 1 thread: 273 passed, 0 failed, 18 ignored; SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.mesh_dispatch::tests::gpu_*/paired_*hang this card every time, so they are excluded.Not tested: Windows, AMD.
AI use: Claude Code (Claude Opus 5.5) did the measurements, the changes, the tests and this comment; the runs were real, on the hardware above.
lucsoft commentedon Nov 24, 2026
A Linux AMD data point (RDNA3), since every Linux report so far is NVIDIA. Two findings: on this stack the learned coherent window makes the retail game unplayably slow, and the workaround for that ends in a reproducible GPU hang right after the intro.
Setup: NixOS, kernel 7.3.5, RX 7800 XT (Navi 32), Mesa 26.1.8 RADV, Ryzen 7 7800X3D, 32 GB. Wine 11.8 Staging (nixpkgs;
ntdll.sohas "Using kernel write watches"), vkd3d-proton 3.1 built with-Db_ndebug=true+ the twofrom_ifacelookups relaxed,VKD3D_CONFIG=ignore_shared_fence, DXVK 3.1.1dxgi/d3d11/d3d10core, DXC 1.9.2609. XCLmain85bdf21cross-built forx86_64-pc-windows-gnu, plus the CBV change from #307 (stride 16).XCL_NETWORK=0. Retail GTA VI.1. CBV stride (#307): confirmed on AMD as well. Without it the menu is the diagonal; with it the account prompt and setup pages draw.
2. With the learned coherent window (4095 MB;
uma_coherent.txtsays 4.8 GB): under 0.5 fpswinedbgbacktrace:q_execute_command_lists/present_x→title_textures::refresh→subresources→tiling::Chain::detile_level/Layout::offset_z.sparse windows timing: write-watch … (15 506 206 dirty pages)after 128 submits), so every title texture on them is re-detiled every submit.MEM_WRITE_WATCH, write all pages, reset, write 2 pages, …) gives exact counts every time.XCL_COHERENT_MB=512: menus at 28–30 fps (900 frames presented, 28.2 fps over the last 300), and with KernelX / title textures: a GPU view of the title's CPU memory reads the CPU view (retail intro video, no green screen) #283 the intro movie plays (6–9 fps). That is the opposite of First run of a title: the coherent window is 512 MB until uma_coherent.txt has been learned (menus at ~12 fps, then 30) #284 (NVIDIA on Windows, where 512 MB is the slow case).GetWriteWatch(RESET)write-protects its pages again, the MMU notifier invalidates the userptr, and the driver's revalidation faults the pages in writable, which uffd-wp then reports as written. That would explain why it is AMD-only and grows with the window.3. With 512 / 1024 MB: a reproducible GPU hang right after the intro
XErrorReport 0x89240107, about 2 s lateramdgpu: ring gfx_0.0.0 timeout(processmain, threadvkd3d_queue), thenD3D12 device removed: 0x887a0005(or0x80004005). This happened 74–151 s in, depending on how fast the run got there, and also with 1024 MB.RADV_DEBUG=hang(three runs, one withnocachefor the disassembly): the same draw every time. Pipeline (RADV hash71ae6799889aaddb), aDrawIndexedof 30 indices, the index buffer in sparse window 0 (a virtual BO, the range bound).vm_fault.logis empty;GE_BUSY/SPI_BUSYare set.VGT_SHADER_STAGES_EN = 0x06012010, so no GS: a plain VS (NGG) + PS. Neither shader has a backward branch.AllocateTitlePhysicalPages(99776): no room in unified memory; it needs Memory windows from the descriptor heap (no per-access switch); NVIDIA OOM fallback; physical-page fixes #187, which no longer applies tomain).coherent 116/512 MB) and fall back to plain memory, which per the comment inkernelx.rsits shaders read as zeros. So the hang is probably a consequence of the workaround, and the real problem is point 2.XCL_COHERENT_MB=2048(1851 MB of the title's heaps in the window) the hang still comes, at the same point in the game: the twoXErrorReportlines, then the ring timeout, 786 s in at 0.7–1.3 fps. So it does not depend on the window size, and the bullet above does not hold.RADV_DEBUG=nonggcchanges nothing. WithXCL_TRACE_FRAME=1, three pipelines draw for the first time right after the twoXErrorReportlines, ~2 s before the hang:vs cc7a1fd71cd7f6b2 / ps 5306d4e7f6e2ca6e,vs ff0798b8f97355d1 / ps 8ab8dca315291c32andvs 3f448213eab8a2da / ps f618f478d0c51397. All three draw triangle lists into the 3840×2160 target with alpha blending, depth off with a D32S8 DSV bound, and no culling. Their console VS are 18–32 instructions: a 2×3 transform from a CBV vias_buffer_load(records cover the reads exactly), attributes passed through, no branches, no indexed loads. So the hang sits in fixed-function vertex/index fetch or primitive assembly, not in shader code. vkd3d-proton logsBroken NULL PRT with SMEM detected, per-game workarounds may applyon this GPU, and the hanging draw's index buffer lies in sparse window 0.Side notes for whoever debugs GPU hangs under Wine
stop_if_device_removedcallsTerminateProcessat once. vkd3d-proton marks the device removed before it writes its breadcrumbs (and waits up to 5 s for VK_EXT_device_fault), so breadcrumbs never get written. A local wait beforeTerminateProcessgets past that.VKD3D_LOG_FILEstays empty: the launcher's GPU probe opens the file first, and the host process can't open it again.Not tested: Windows, NVIDIA, a full-window run up to the post-intro point (at < 0.5 fps it doesn't get there).
AI use: Claude Code (Claude Opus 5.5) did the investigation and wrote this comment. The runs were real, on the hardware above.
notdxbi commentedon Nov 24, 2026
Two more things past the loading screen, on
maina6f5f7a/2997c9a(no code change between them). Same box: RTX 5060 8 GB, Wine 11.22 Staging, relaxed vkd3d-proton. Neither is in an open PR or issue as far as I can find.1. The endless loading screen:
XNetworkingGetConnectivityHintsays "online" whileXCL_NETWORK=0blocks everything.XCL_NETWORK=0. The title believes it is online and keeps asking for ROS tickets (CreateTicketXbl3, "no Xbox Live", with growing gaps, as @wiktorekdev saw).xgameruntime/networking.rs):_ if crate::hle::netoff::enabled() => 1(None) before the host mapping, i.e. a console without a network.+0x56a0dwas with the "online" answer; I haven't checked that same wait with this change.2. Then the title stops on its own
int3at+0xb18de7:XMemMapPhysicalPagesScatter(addresses, n, NULL)is refused.+0xb18dc0callsxmem!XMemMapPhysicalPagesScatter(&addrs, count, NULL)(the IAT slot resolves to it) and executesint3if it returns 0. The Breakpad reporter follows.ERROR_INVALID_PARAMETERfor a NULL page array. Page 0 already means "unmap this address" in the scatter, so I take NULL as page 0 for every address.scatter_without_pages_unmaps(map two pages, write, unmap with NULL, the addresses are no longer committed, mapped again they read what was written): fails without the change ("refused"), passes with it.3. Next stop (still open), on an 8 GB card while the world streams:
kernelx::unmap_away→sparse::decommitted→unmap_tilesrunsUpdateTileMappings(NULL)on the sparse-window queue straight away. Nothing orders that after GPU work already submitted on the title's queues or XCL's upload queues that may still use those tiles. Before 2, these unmaps were refused, so this path wasn't reached. I'm working on making the tile unmap wait for that work.NV_ERR_NO_MEMORY(system memory). Same phase, same memory pressure as @pedro-anthony on 12 GB.4.
device_type = "lockhart"(Series S) with #242: steady 30 fps, but every dumped frame is black (0 of 129 600 samples non-black, 1920×1080), so it isn't a way around the memory limit. Back on "anaconda".Also (Linux): Wine's PipeWire stream runs with a 256/48000 quantum. The audio comes in bursts while the title loads (decode 97–118 % of real time per 5 s), so it crackles.
PULSE_LATENCY_MSEC=60/PIPEWIRE_LATENCY=1024/48000help.Tested (Wine, RTX 5060), on
a6f5f7a+ these changes + my earlier ones: lib CPU tests 364/0, GPU tests (serial) 273/0, plus the new scatter test. Runs: A pressed at the account prompt, 160–300 s.Not tested: Windows, AMD.
AI use: Claude Code (Claude Opus 5.5) found these, wrote the changes, the test and this comment; the runs were real, on the hardware above.
notdxbi commentedon Nov 24, 2026
I just heard the first part of the intro I've gotten like 0.5 seconds into the first cutscene by the looks of it.
bKNNNNN commentedon Nov 24, 2026
An audio comparison for the semaphore wait in my earlier RTX 5080 report. Both runs used unmodified XCL
a6f5f7a74cc620c1f88a9e3669a633d10c3c8212, Proton Experimental, the same saved profile andXCL_NETWORK=0in an isolated network namespace.Without an audio output in the sandbox, the guest entry thread was still in the same infinite wait at guest offset
+0x56a0dat 145 and 180 seconds. With a private PipeWire null sink, Wine opened a playback stream. At that same call site the trace recorded 195 successful wait returns across the two semaphores (98 and 97). This was with upstream networking behavior. The effect of the connectivity-hint change on this wait remains untested here.In a separate run with the virtual output active and Wine relay tracing off, the last screen I could confirm was the loading artwork. At 223.5 s XCL reported
0xc0000005at guest offset+0x23cf683(write to null). For anyone comparing traces under Proton, it would help to record whether Wine actually opened a playback stream during loading.AI-assisted local testing (OpenAI Codex).
notdxbi commentedon Nov 24, 2026
The three changes from my last comment are now draft PRs, each with a test that fails without it and the lib suite run on the branch (Linux/Wine, RTX 5060). They need someone with Windows for the
smoke.ps1regression run:XCL_NETWORK=0makes the connectivity hint None (no more ROS ticket loop)XMemMapPhysicalPagesScatter(…, NULL)unmaps instead of being refused (the title'sint3at+0xb18de7)A correction to my earlier comment, after @bKNNNNN's audio comparison: our runs always had a PipeWire output. So the semaphore wait at
+0x56a0dwas probably never what held us. What #494 changes for sure is the token loop; I can't say it is what gets past the loading screen.sperm commentedon Nov 24, 2026
An RDNA4 data point, since the Linux reports so far are NVIDIA and one RDNA3 card.
Update (rerun): the early stall below is fixed by
VKD3D_CONFIG=ignore_shared_fence, the setting in #257'sdocs/linux.md. With it the retail game runs: 1,303 presents at a steady 30.0 fps, 3840×2160. The last sampled frame (XCL_FRAME_DUMP=120, frame 1220) has 517,542 of 518,400 sampled pixels non-dark. No crash and no watchdog; I closed the window at 61 s. I haven't checked yet what is on screen (menus, intro or loading).Update 2 (played into the world): with a controller, the menus go through, and the game loads into the world. The title's crash context says
Game Running, 3m18s, frame 2455, 637 streaming requests, tile heap 3,685 / 6,236 MB. It runs at 30 fps, drops to about 7 fps for the last minute while compute pipelines build, then the "GPU Loc Sig" abort (+0x23cf683, #505 / #534) comes at 229.8 s. With #533 it's the same at 202.7 s (report).Update 3 (where the slow pipeline builds go on Linux): XCL
main508a0c7plus #533 (f849ecc), #208/#273 (5f12643), #267 (043d1f7), #567 (7a63914) and #574 (86a5d0b), merged locally (#574conflicted with #267 inbind.rs; I took #574's side). Same machine and Wine as below.xcl-psoworkers sat at 100% CPU. 18 of 18 stack samples were inside vkd3d-proton's dxil-spirv structurizer, almost all inCFGNode::find_common_post_dominator(the rest inget_outer_selection_dominator,dominates_all_reachable_exitsandcan_optimize_conditional_branch_to_static). So on Linux the time goes in DXIL → SPIR-V, a step native Windows drivers don't have.master30b0eb9(dxil-spirv34f0ff8, with the structurizer rewrite from dxil-spirv XGameSave: a long valid container name makes every save to it fail #326), same relaxedfrom_ifacechecks: no samples in dxil-spirv any more; the one busy worker was inside RADV (Mesa 26.2.6, no symbols). In a 239 s run: 9 compute pipelines over 4 s, 0 draws lost, 256 dispatches skipped (6,223 with 3.1). The run was shorter, so it's a direction, not a measurement. The first minute is slower (the vkd3d shader cache starts cold after the version change).+0x2215c35at 117 s (run on 3.1),+0x23cf683at 185 s (run on master), both while frames dropped to 7–12 fps. Held with a local vectored handler that parks that one thread, the game went back to 30 fps after the 117 s one.DwmSetWindowAttributedoesn't implementDWMWA_CLOAK, so the title's own window stays visible next to XCL's. Moving it off-screen inWM_WINDOWPOSCHANGING(local change) hides it.DualSense over Bluetooth under Wine: out of the box, Wine opens it as raw hidraw, and XInput sees no pad. With
HKLM\System\CurrentControlSet\Services\winebusDisableHidraw= 1 (DWORD) in the prefix, Wine's SDL backend presents it as XInput pad 0, and XCL's GameInput uses it with no code change. This works inside the network namespace too. (#552 leaves a Bluetooth DualSense out on Windows.)Setup: CachyOS, kernel 7.3.4, RX 9070 XT (RADV GFX1201), XCL
mainat508a0c7, DXC 1.9.2609.wine. System Wine 11.22 was also tried for the stall below.dxgi.b_ndebug, withd3d12_command_allocator_from_ifaceandd3d12_command_list_from_ifaceaccepting any non-null object (the same idea as Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257's patch).-Zbuild-std,lld-link,clang-cl+ xwin.XCL_NETWORK=0,XCL_COHERENT_MB=512, isolated network namespace.Without
ignore_shared_fence(four runs, same every time, both Wine builds)PresentX, 839 unique shaders, DirectStorage requests flow.queue #35 ExecuteCommandListsX (1 lists, value 0x1), after BVH build/copy and meta commands, then spins on the value.0xc0000005write at+0x2215c35, at 41.6–42.4 s. The crash context saysGame State: Game Init, frame 0.winevulkan: signaller_worker wait timed out with non-empty poll list.called_stubs: list#131and#132, allocator#9.Not tested: #494 / #495 / #496 / #572,
RADV_DEBUG=hang, a run on vkd3d-proton master as long as the 3.1 one, Mesa with symbols (which RADV pass is slow), an RDNA3 or NVIDIA card on the same build.Breakpad warning for Linux testers: without network isolation, the title's crash reporter uploaded its minidump to
submit.backtrace.iohere too (as in #505). Run insideunshare -nor behind a firewall block; inside the namespace the upload fails with WinHTTP 12029.AI use: Claude Code, Claude Opus 5.5: ran the builds and the runs, and wrote this report from their logs. Counts and outcomes only, no game files.
D3D12.X: Wine and Proton compatibility fixes for vkd3d and retail HLE
radv-tinker commentedon Nov 24, 2026
An RDNA4 data point for the post-intro GPU hang @lucsoft reported on RDNA3: same hang, same draw, plus what I ruled out and one log line that precedes it in every run.
Setup: Fedora 43, kernel 7.0.11, RX 9070 XT (GFX1201), Mesa 25.3.6 RADV. Proton Experimental's Wine, vkd3d-proton v3.1 with the #257 patch (
-Db_ndebug=true), DXVKdxgi/d3d11/d3d10corefrom Proton, DXC 1.9.2609. XCLmain2997c9a+ #257 + #451 + #486, cross-built forx86_64-pc-windows-gnu.XCL_COHERENT_MB=512,XCL_NETWORK=0. Retail GTA VI 1.0.2.1.The hang. Every run: account prompt answered with A, intro plays, then
amdgpu: ring gfx_0.0.0 timeout(threadvkd3d_queue) andD3D12 device removed: 0x887a0005, 2–3 min in. Seven runs, seven hangs at the same point.RADV_DEBUG=hang,nocache: the last trace point the CP reached is right after aDRAW_INDEX_2withVGT_NUM_INDICES = 30, index buffer at0xffff8001a3a7…(sparse window), then aPS_PARTIAL_FLUSHthat never completes. VS (NGG) + PS only, neither has a backward branch (the VS is mostly bounds-checked scalar loads + 3 attribute-ring stores).GE_BUSY,SPI_BUSY,SC_BUSY,DB_BUSY,BCI_BUSYset;UTCL2_BUSY/EA_BUSYclear;vm_fault.logempty. RADV also prints "The CS has been cancelled because the context is lost. This context is innocent." in a normal run. So it is the same draw as on RDNA3.Ruled out:
ACO_DEBUG=noopt,nosched,force-waitcntwithRADV_DEBUG=nocachehangs the same way.RADV_DEBUG=llvmcan't be tried: vkd3d-proton then reports SM 6.0 and XCL refuses the device.dstorage.rslocally; the BC1 request that used to fail just before the hang now decodes (BCPack decoded so far: 4 requests (BC1 4)), hang unchanged.One line before every hang. In every run that reached the hang, and in none that stopped earlier, there is exactly one:
The source varies only a little across runs (
0x117b9f0000…0x117bb70000); the destination is always around0x3dfe…–0x3e87…. With a local diagnostic incopy_memory_x:So the source is in a GPU view whose CPU view is not committed (nothing the CPU wrote), it is not a physical page, and the destination is outside unified memory too. A local attempt to stage the source through upload memory (as
gpu_vadoes for buffers) can't help, because there is nothing readable to stage. My guess, not verified: those 16 KB are something the GPU wrote earlier through that GPU view, the copy is skipped, and the 30-index draw then reads stale data that NVIDIA tolerates and AMD's GE doesn't. I haven't found who writes0xb7bb70000's GPU view or what reads0x3dfe…afterwards.Side result: #451 + #486 together took the intro video from ~5 fps to ~20 fps here (menus ~23 fps), so they help on AMD under Wine too.
Happy to run a trace (
XCL_TRACE_FRAME, extra logging incopy_memory_x, a build of a branch) on this card.AI-assisted.
matheusfermiano-source commentedon Nov 24, 2026
Test suite under Wine on an RDNA2 iGPU (Radeon 660M, RADV) and an RTX 3050 Laptop,
maina6f5f7a, built forx86_64-pc-windows-gnullvm. The Linux reports so far are NVIDIA, RDNA3 and RDNA4; this adds RDNA2 (gfx1035) and three Linux notes that aren't in this thread yet.Tested
a6f5f7a74cc620c1f88a9e3669a633d10c3c8212(main), clean tree. Debug:cargo build --workspaceandcargo test --workspace --no-run, targetx86_64-pc-windows-gnullvm, llvm-mingw 20261117, Rust 1.97.1. Each test.exerun under Wine with--test-threads=4.VK_LOADER_DRIVERS_SELECT, plusDXVK_CONFIG='dxgi.hideNvidiaGpu = False'for NVIDIA.experimental-11.0-20261027b), prefix from Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257'ssetup-prefix.sh. vkd3d-proton v3.1 with Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257's patch and-Db_ndebug=true, Proton's DXVKdxgi/d3d11/d3d10core(3.1.1-97), DXC 1.9.2609.5.VKD3D_CONFIG=ignore_shared_fence,XCL_NETWORK=0,DISPLAYset (see the first note).SKIPPEDno wave64)Failing on both GPUs (Wine / vkd3d-proton, not the GPU):
predication_e2e::set_predication_buffer_state_and_kickoff:dst[0]is0xAAAA0000, want0x11111111. vkd3d-proton predicates draws and dispatches but notCopyBufferRegion, and this test's predicated commands are copies.pls_quota::disk_free_space_ex_reports_pls_quota: error 2 instead of 3 forS:\missing. The hook forwards to Wine'sGetDiskFreeSpaceExW, which returnsERROR_FILE_NOT_FOUND.e2e::test_title_runs_and_game_folder_is_untouched:W: not cloaked(no DWM cloaking, @notdxbi's item 2) andXMA2 GetState: ctx=0x0, queued=1, the same ashle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime(also failing).Radeon 660M only:
gpu_f64_rootsandgpu_f64_math_random(v_rsq_f64of negatives and NaN = 0, what #530 fixes; RDNA4 there, the same on RDNA2), andgpu_nonfused_mad_and_mac_prevent_fma_contraction(fused control gives +inf: RADV on RDNA2 leavesmad()unfused like the RDNA1 Windows driver in #472). All three pass on the RTX 3050 under the same Wine and vkd3d-proton.RTX 3050 only:
gpu_more_atomics_sub_dword_scratch_valuhangs the GPU (NVRM: Xid 109, CTX SWITCH TIMEOUT), the dxil-spirv bug @BlestTerror found above (HansKristian-Work/dxil-spirv#372, still open). Every GPU test after it then runs on a lost device, so the other lib counts are from a rerun with--skipfor it.Linux notes
Failed to create Vulkan instance, every GPU test printsSKIPPED …: no GPUand passes (87 such lines in my first run). NVIDIA's Vulkan driver has noVK_EXT_headless_surface; RADV has it, which is why the 660M ran headless. WithDISPLAYset, the 3050 is used. Check theSKIPPEDcount before trusting a run over SSH or in a container.xcl.exenever finish (over 10 min).gpu_pso_e2ehangs insample_pack_read_errors_fail_instead_of_skippingwhen the whole binary runs (5 of 5 runs); alone it passes. WithDISPLAYset, both binaries finish in seconds on both GPUs.x86_64-pc-windows-gnullvmbuildsmainwith llvm-mingw unchanged, with no MinGW gcc and no xwin. Set the linker andCC/CXX/ARfor that target to llvm-mingw'sx86_64-w64-mingw32-*, and copy llvm-mingw'slibunwind.dllandlibc++.dllnext toxcl.exeand the test executables (debug/anddebug/deps/), otherwise they exit with0xC0000135. Itsxcl.exehas a TLS directory (llvm-readobj --coff-tls-directory) andpe::tests::parses_own_test_binary_tlspasses, so TLS: xcl.exe built with MinGW and lld keeps its TLS directory #464's problem does not come up with this target.Not tested: Windows; any retail title; a release build of the tests; GCN (Vega).
AI use: Claude Code (Claude Opus 5.5) set up the build and the runs, read the failures and wrote this comment. The runs were real, on the hardware above. Counts only, no game files.
pickles976 commentedon Nov 24, 2026
Test-suite ground truth from a second Linux/Wine setup (host: Ubuntu 22.04, Wine 9 built-in
d3d12= vkd3d, Mesa llvmpipe Vulkan — no vendor D3D12 anywhere in the stack), cross-build recipe in #520 (llvm-mingw linker; gotcha:-lunwindmust resolve to the staticlibunwind.abeforelibunwind.dll.a, else the exe dies silently at startup):cargo test -p xcl --lib --target x86_64-pc-windows-gnuunder Wine: 286 tests pass, until the process aborts inhle::d3d12x::bind::tests::create_list_reset_and_clear_state_track_initial_pso_on_d3d12:D3D12.X: ID3D12Device5 – 65 PC methods, … (+64 stubs, PC vtable wined3d.dll+0x2259c0)— XCL hands a wrapped/guarded interface to vkd3d, and vkd3d answers with a vtable-identity assertion instead of an error code.This is a direct datapoint for the thread's thesis (the obstacle is vtable replacement): even XCL's own unit tests, touching nothing console-specific, abort at a vtable-identity check once the host driver is vkd3d rather than MS
d3d12.dll. Windows d3d12 would returnE_INVALIDARG; vkd3d (including Wine's built-in one, asserts enabled even in release builds) kills the process. Any proxy-object design that ever passes a non-canonical iface into a hostID3D12*method will hit this class of assert; the unit suite run under Wine is a cheap canary for it — worth wiring into CI once the one test is green (or#[ignore]-gated for vkd3d hosts).Also: 286/287 means the CPU-side HLE (acphal/XGameSave/PLS/shader decode…) is fully healthy under Wine — the earlier per-area Wine reports hold up; the boundary is exactly where real device objects are handed across.
pickles976 commentedon Nov 24, 2026
Follow-up with the e2e binaries on the same Wine 9 + llvmpipe setup (
--test-threads=2, xvfb):console_dlls_e2econsole_shadersdisasm_e2eheap_probepls_quota--lib)The
pls_quotafailure is a Wine-only export-location gap:hook: kernelbase.dll!CopyFile2 not found. On WindowsCopyFile2is akernelbaseexport; Wine still exports it fromkernel32. One-line portability fix for the hook resolver: when akernelbase.dll!<fn>lookup misses under Wine, retrykernel32.dll!<fn>(the reverse also holds for a fewkernel32functions Wine moved into kernelbase). With that, the whole CPU-side suite is green on Linux/Wine — the only remaining blocker in the lib suite is the vkd3d vtable-identity assert noted above.