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.
60 remaining items
pickles976 commentedon Nov 24, 2026
Source-side read of your remaining assert from the in-place-placement lane (hash-matched build of
9e3831e): your observation fits the adoption convention exactly. Adoption is done at creation factories — the codebase even has the rule as a comment ("made through the titles device it is adopted already",alloc_pool.rs:239) — and the display-target path (real.rs:2276+, the "console memory comes from the titles allocation hook" factory,CreateCommittedResource (console, slot 76)) is one of the paths that reaches for the underlying PC device rather than the title-facing device.[INFERENCE]from what I can trace statically: that makes its returned resource the remaining non-adopted creation object on the assert-bearing path, and the one-line completion is adopting it at creation (adopt(res, Kind::Resource)after success), same as the allocator pool does — but that call needs confirmation from @ksanjeev284/#1395-owner, who knows the passback bookkeeping better than a static read. Two notes on severity so the queue ranks it right: ① this assert is a diagnostics-build wall — vkd3d-proton release without asserts passes the pointer fine, which is why your earlier runs with this title got past display targets; it blocks the assert-keeping cohort (the very people producing your best reports), not production users. ② Your offer to rerun withVKD3D_DEBUG=fixmeis worth taking for this object only — the vkd3d call the object is passed back through names the exact passback site, converting my[INFERENCE]into a line number. Worth 10 minutes on the next run.pickles976 commentedon Nov 24, 2026
Your
+0x4dcbc9ddecode is complete from the exe side — I posted the full read on the map thread (VIctory#630), short version: the int3 fires iff requested append quantity > fixed capacity − used — an inline overflow guard in the title's own append routine (+0x4dcbc40), so at frame 82 a container received more records than it was sized for. One ask sized to your repro, high value: at the moment just before the trap (or at the heap/format creation calls preceding it), dump the emulator-reported sizing inputs the title could be planning from — custom-heap properties (tile size, attributes),GetCustomHeapTextureSizes-equivalents, and any format-topology counts — so we can diff them against console-expected values. If one is reported at a granularity that multiplies record counts (tile size ÷16 ⇒ count ×16), you have the fix in one line instead of a bisect.wayback94 commentedon Nov 24, 2026
Linux test run of
mainat9e3831eon an RTX 3080 (Ampere, 32-lane waves) under Proton Experimental's Wine, with the vkd3d-proton build from #257.Tested
main9e3831e, clean tree. Rust 1.100.0,x86_64-pc-windows-gnu(mingw-w64-gcc 16.2.0, posix threads), debug:cargo build --workspace+cargo test --workspace --no-runexperimental-11.0-20261112(files/bin/wine, has "Using kernel write watches"). Prefix from Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257'ssetup-prefix.sh(Proton's libvkd3d and DXVKdxgi/d3d11/d3d10core). vkd3d-proton v3.1 + Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257's patch,-Db_ndebug=true, built with Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257'sbuild-vkd3d-proton.shat26fdda6. DXC 1.9.2609..exerun under that Wine from its package folder,--test-threads=4, withWINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b",VKD3D_CONFIG=ignore_shared_fence,DXVK_CONFIG='dxgi.hideNvidiaGpu = False',XCL_NETWORK=0,XCL_DXC_DIRset. NoXCL_SAMPLE_*set.gpu::recomp::tests::gpu_more_atomics_sub_dword_scratch_valuhangs the GPU, the GPU tests after it fail, thenthread caused non-unwinding panic. aborting.(exit 9). The same cascade as in Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257.gpu::recomp:: --skip gpu_more_atomics_sub_dword_scratch_valu: 191 passed, 0 failed, 18 ignored--skip gpu::recomp::: 533 passed, 2 failed, 3 ignoredgpu_more_atomics_sub_dword_scratch_valu, left out with--skipand failing when run alone (the two lib passes add up to 747 of the lib's 748 tests).SKIPPED: 2 (no wave64:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware), 1 ingpu_compute_e2e(heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)gpu::recomp::tests::gpu_more_atomics_sub_dword_scratch_valukernel dispatch: GPU fence still pending after 10000 ms, also when run alone (--exact)hle::d3d12x::device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed5383506):UNORDERED_ACCESS without the UAV flag(device_x.rs:1113). The test places a D16 texture whose PC description hasALLOW_DEPTH_STENCILand noALLOW_UNORDERED_ACCESS(pc_resource_descdrops it) inD3D12_RESOURCE_STATE_UNORDERED_ACCESS, and expects an error. vkd3d-proton v3.1 returns success:d3d12_resource_validate_create_info/_initial_resource_state(libs/vkd3d/resource.c) check RENDER_TARGET and DEPTH_WRITE/READ states against their flags, but UNORDERED_ACCESS only for acceleration structures. Fails alone too, 2 of 2 runshle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetimeleft: 0, right: 12291(xaudio2.rs:1599), as in #257 (Proton's Wine)predication_e2e::set_predication_buffer_state_and_kickoffEQUAL_ZERO(0) must skip dst[0](2863267840vs286331153)e2e::test_title_runs_and_game_folder_is_untoucheduser32 … W: not cloaked,XMA2 GetState: ctx=0x0, queued=1pls_quota::disk_free_space_ex_reports_pls_quotaleft: (0, 2),right: (0, 3)Same PC, same commit, on Windows (for comparison)
stable-x86_64-pc-windows-msvc, MSVC 14.44 / Windows SDK 10.0.26100.0 (its DXC 1.9.2602.17), debug.\scripts\test.ps1, noXCL_SAMPLE_*, nothing skipped: 776 passed, 0 failed, 41 ignored, the same 3SKIPPEDlines. No hang, no device removal. All 6 tests in the table above pass, so on this PC all 6 differences come from Wine, vkd3d-proton or the Linux driver.gpu_depth_buffer_created_for_unordered_access_is_placedalone (--exact): passes 3 of 3 on driver 610.88, and 3 of 3 again after updating to driver 621.14 (32.0.16.2114), same build. So Windows' D3D12 refuses the UNORDERED_ACCESS placement without the UAV flag, as the test expects. The HRESULT it returns was not recorded.XCL_SAMPLE_RPFset to my own copy of the shader pack: also 776 / 0 / 41.Not tested
run.sh/smoke.sh/smoke.ps1);XCL_SAMPLE_*tests under WineXCL_SAMPLE_RPFrun on driver 621.14 (only the depth test was rerun there)AI use
pickles976 commentedon Nov 24, 2026
Three things from reading the matrix as a whole: ① depth+UAV has a spec-side tiebreaker: D3D12 forbids
ALLOW_UNORDERED_ACCESSon depth-stencil formats —CreateCommittedResourcemust failE_INVALIDARG— so the fork is one line: if the test expects rejection and vkd3d-proton returns S_OK, that is an upstream validation gap worth a 2-line repro against vkd3d-proton proper (not a #257 artifact); if the test expects success, the test carries a console-side allowance that PC validation does not honor, and the test is the thing to change. Either way it stops being an open question the moment someone names which side it asserts. ② The 3080 skips are the good posture made visible:gpu_wave32_program_in_wave64_hardwareand the prefix-count test skip loudly when hardware cannot host them — the sibling runtime's legalize-without-remap default would run those same programs and return quietly wrong cross-lane values instead of skipping. This report is a nice exhibit for the #1407 wave-log argument: the skip line names the class, the silent path names nothing. ③ Your AI-use disclosure (agent set up toolchain + wrote report; human checked counts against logs) is exactly the standard the triage thread asked for — counts-verified is the load-bearing half, and it is why this report is directly citable. The scratch_valu cascade matches #257 exactly (same post-reset contamination; isolating it from the "2 failed" set was the right call).wayback94 commentedon Nov 24, 2026
Thanks. One correction on ①: the test doesn't create a depth texture with
ALLOW_UNORDERED_ACCESS.pc_resource_descdrops that flag, and the test then places the texture withCreatePlacedResourceinD3D12_RESOURCE_STATE_UNORDERED_ACCESS, without the flag, and expects an error. vkd3d-proton v3.1 accepts it. Inlibs/vkd3d/resource.cit checks the render-target and depth states against their flags, but checksUNORDERED_ACCESSonly for acceleration structures.Update: Windows answers it. On the same PC and commit (
9e3831e, RTX 3080, Windows 11, driver 610.88), the test passes 3 of 3, so Windows' D3D12 refuses the placement as the test expects. That makes it a missing check in vkd3d-proton, not a problem in the test or in XCL. The whole suite on Windows on that PC gave 776 passed, 0 failed, 41 ignored, so all six differences in the Linux run come from Wine, vkd3d-proton or the Linux driver. I counted both runs with a script that adds up each test binary'stest result:line.AI-assisted: Claude Code (Claude Opus 5.5) checked the vkd3d-proton source, ran the Windows tests and drafted this reply.
Tests: ignore the pipeline cache vkd3d-proton writes under Wine
user: hide title console window when DWM cloaking is unavailable (xcl…
Tests: stop leaking imported heap resource references
D3D12.X: under Wine, vkd3d-proton's assert-checked classes keep their…
D3D12.X: use dedicated PC direct queue for PresentX under Wine (xcl-d…
Tests: the UMA import check test skips where D3D12 has no heaps over …
YaBulochka commentedon Nov 25, 2026
Consolidated summary of the Linux/RADV bring-up on this box, so the thread has one place to read instead of a stream of updates.
Setup: RX 7600 XT 8 GB, RADV 26.99.99, Wine 11.22, XCL
main568e7db, vkd3d-proton master with dxil-spirv #374.Timeline
568e7dbd3d12_resource_vtblassert right afterdisplay target 3840x2160 format 28568e7dbID3D12Heap1and dies atvkd3d_private.h:1079,iface->lpVtbl == &d3d12_heap_vtbl(~3 s)legacy-struct-remove)XCL_DSTORAGE_MEMORY_BUDGET_MIB=2048 XCL_VRAM_ARENAS=2 XCL_COHERENT_MB=512assert(iface->lpVtbl == &d3d12_*_vtbl)removed invkd3d_private.h0x80000003 at game_scarlett_master.exe+0x2478b7b,rax=rdx=0x80070057(E_INVALIDARG)VKD3D_CONFIG=breadcrumbs,breadcrumbs_traceE_INVALIDARGVKD3D_DEBUG=warnd3d12_command_list_Reset: Invalid command allocator.Reading. XCL wraps vkd3d objects by swapping
lpVtbl; vkd3d'simpl_from_*helpers reject the wrapper, and the heap assert is simply the first one reached. Masking the asserts lets the wrong interface travel further: the object layout is evidently identical (vkd3d did not crash onCONTAINING_RECORD), but the title then getsE_INVALIDARGright after device / queue / fence / command-allocator creation.VKD3D_DEBUG=warnnames it:d3d12_command_list_Reset: Invalid command allocator- the title passes its wrapper as the allocator, and vkd3d does not recognise it. So the real fix belongs in XCL - hand vkd3d the underlying interface, or unwrap beforeimpl_from_*- and the heap assert is the right place to start reading.No game files, no captures; counts and addresses only.
D3D12.X: preserve native vtables and wrap fences for vkd3d-proton und…
ClosetPie107 commentedon Nov 25, 2026
Linux / AMD RDNA4 (RADV) progress check on
main426a5a7(after today's merge wave), withXCL_DIRECT_DXIL=1on the retail title (1.0.2.1).Setup
experimental-11.0-20261112), DXVKv3.1.1-209, DXC1.9.2609.5,x86_64-pc-windows-gnurelease build,XCL_NETWORK=0,XCL_COHERENT_MB=512,XCL_DIRECT_DXIL=1, capped atMemoryMax=18G/MemorySwapMax=0,XCL_RUN_SECONDS=180.Result
#257+dxil-spirv53aac418, the#775pin): runs at 30 fps through 1,200+ frames, then crashes at 50.2 s with an unhandled0xc0000005(read at0x130) insidedxil-spirv'sCFGStructurizer(node.cpp→cfg_structurizer.cpp→dxil_converter.cpp) on a translated direct-DXIL compute shader.#257+dxil-spirvlegacy-struct-removee084e35c, Remove legacy structurizer for good HansKristian-Work/dxil-spirv#374):exit=0at 180 s.ActivateProbes(direct DXIL compact form: 14377 blocks of 599 kinds,#2174) built cleanly at 59.8 s; huge 300–520 KB world-loading compute PSOs (#1613–#1715) compiled cleanly in 3.2–7.2 s each on RADV (graphics PSOs in 0.3–0.4 s) all the way to 180 s, with Opus audio still streaming (41,238packets, 0 errors).568e7db), right after 8 bridgedWait64BitValueX(wait-before-signal) queue waits, withGPU fences still pending after 10 son shutdown (the existing cross-platform stall in Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505 / Retail game (retail title, Series X build): GPU device removal after Wait64BitValueX waits with no producer; also watchdog stalls on slow compute pipeline builds #1452).Update (
main1a0bbe3+ upstreamdxil-spirvmaster694cc674,XCL_RUN_SECONDS=600):exit=0, flat 13.1–13.7 GiB RSS / 15.1 GiB VRAM (0 swap), 0 crashes / 0 device removals.#1751–#1788) at 2.6–4.3 s each on RADV by 435.6 s, then sat idle (no compiles or presents; Opus audio still running) until 600 s (1,727frames shown,GPU fences still pending after 10 s), confirming the stop is the Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505 / Retail game (retail title, Series X build): GPU device removal after Wait64BitValueX waits with no producer; also watchdog stalls on slow compute pipeline builds #1452 fence stall rather than ongoing shader compilation.Not tested: default HLSL route on
426a5a7/1a0bbe3, stock unpatched vkd3d-proton.AI use: T3 Code / Antigravity (Gemini 4 Neon) built and ran these checks on this machine and drafted this report.
itsd-effex commentedon Nov 25, 2026
A Linux / NVIDIA note for anyone measuring warm against cold, or using
xcl pipelines(#759).What I saw:
xcl.exeandtitle.exe(which owns the D3D12 device) each hold a different file of NVIDIA's shader disk cache. In my cache folder those are…fe7and…fe8(checked withls -l /proc/<pid>/fd).xcl pipelines, which runs as a process of its own, wrote to the host's file (fe7). The title never read it.What fixed it: swapping the two files before the run. The same pipelines went from 4–33 s misses to 1–6 ms hits. My guess is that NVIDIA gives each process open at the same time its own file, but I haven't confirmed that beyond these runs.
What this means for Linux numbers: a "warm" measurement may not be warm from the run you think. Mine from the night before were warmed by earlier title runs, not by the tool. For a cold Linux run, point
__GL_SHADER_DISK_CACHE_PATHat an empty folder.Details, and a second trap (the tool builds the memory-window form of the journal's latest run, so heap-window runs and non-heap runs don't share pipelines): #759 (comment)
Written with Claude Code (Claude Opus 5.5).