Linux: build vkd3d-proton with a dxil-spirv that structures the retail title's compute programs (#611) #775

Open
github-bot wants to merge 4 commits from github-bot/gh-775 into main AGit
Owner

@⁠gccody on GitHub · 2026-11-24 05:07 UTC · original
gccody:linux-dxil-spirv-guard → main · +602 −2 · 10 files · 4 commits · open

Stacked on #257 (its 3 commits, rebased on current main, are the first ones here; only the last commit is this PR). Fixes #611.

On Linux, the retail title (1.0.2.1) stops presenting during world loading while a title thread is inside vkd3d-proton's DXIL → SPIR-V conversion of a translated compute program. Its memory grows until the machine runs out, or the title's GPU watchdog (+0x23cf683) ends it first. The cause is vkd3d-proton v3.1's dxil-spirv (8b48f0e). Current dxil-spirv master has fixed it, so build-vkd3d-proton.sh now builds v3.1 with its dxil-spirv submodule at 53aac41.

(An earlier version of this PR patched v3.1's dxil-spirv to give up on these programs. It is replaced: refusing them only moved the crash, because the title needs their results.)

What goes wrong in v3.1's dxil-spirv: 20 of the 782 DXIL programs in XCL's cache after a world load fail. Two of them, traced with gdb, perf and temporary logging:

DXIL what happens
d0771dbcd87e4d6d (2e0055c25f49848a_Compute, the one #611 names) while (rewrite_invalid_real_loop_breaks()) structurize(1); never ends. Every round dispatches the same loop again (header 339.pred, merge 52.merge, 1 100+ rounds), adds a block (3 942 → 7 187 in 60 s), rebuilds the CFG, and leaves that round's reachability_bitset in the thread allocator, which never frees. Native CLI: still running at 300 s, 26 GB. In the title: 19 GB and swap full.
9f05e0a08e548fdd A transform leaves a loop header with a second back edge. visit() asserts against that, but release builds compile the assert out, so the edge stays in pred / succ as a forward edge. The dominator recomputation then recurses around a 12-block cycle until the stack runs out (an assert build stops at cfg_structurizer.cpp:3452). Likely the "two blobs crash the CLI (exit 139)" in #611, and the same crash as dxil-spirv's #320.

What is in it

  • scripts/linux/build-vkd3d-proton.sh:
    • After vkd3d-proton-xcl.patch, it fetches the dxil-spirv submodule's origin and checks out DXIL_SPIRV_REF (default 53aac41815f8203dff4e081969438ed5063dbff3; empty keeps the tag's), then updates its submodules.
    • It prints the commit it builds with. A rerun on an existing work dir leaves an already-moved checkout as it is.
    • The per-patch check is now one apply_once function.
  • docs/linux.md: says so in the vkd3d-proton section.

v3.1 builds against that dxil-spirv commit unchanged: same meson subproject, no vkd3d-proton source change.

Tested

  • RTX 3080 10 GB (NVIDIA 580.178.04), i9-10900KF, 61 GB RAM, Ubuntu 26.04.1 (kernel 7.0). GE-Proton 11-14's Wine, DXC 1.9.2609.5, VKD3D_CONFIG=ignore_shared_fence, XCL_NETWORK=0, no network.
  • build-vkd3d-proton.sh on an empty work dir: clone, patch, dxil-spirv at 53aac418, d3d12.dll + d3d12core.dll. A second run on the same dir: "already applied", same commit, built.
  • Native dxil-spirv CLI (--bindless --validate, 120 s limit per program), all 782 DXIL programs of the title's cache:
dxil-spirv convert and validate fail slowest
v3.1's 8b48f0e 762 20: 11 crash / error, 9 still running at 120 s > 120 s
53aac41 782 0 7.6 s (bbdb276f717dd7a8)
  • Retail title, 1.0.2.1, story load started by scripted presses. XCL here is a local branch with #273, #533, #684 and #708 merged, plus two local changes (graphics pipelines get #533's bounded wait in draws and ExecuteIndirect; a file-driven button-press helper used to walk the menus), XCL_BIG_COMPILES=6 (#820).
    • With v3.1's dxil-spirv, the title hangs in the conversion. With a version that refuses these programs instead, it crashes reading data they should have written (an empty half-float AABB, 0x7c007c00fc00fc00, then a read at -1).
    • With 53aac41: no thread is in dxil-spirv for long, no pipeline is refused (0 the driver rejected the compute PSO), and 2 383 of 16 046 dispatches were skipped at the stop (still building).
    • The title then ends at 271 s with D3D12 device removed: 0x887a0005, reported in #708's Wait64BitValueX gate on queue. No Xid in the kernel log. That is the next obstacle, not part of this PR.
  • xcl_testtitle under the same Wine with the new DLLs: 48 passed, 2 failed (user32 cloaking, XAudio2 XMA2 GetState: the Wine results of #175), the same as with v3.1's.

Regression run
This PR only changes scripts/linux and docs/linux.md; the runtime changes in the diff are #257's. Blocks from #257's scripts/linux/smoke.sh under Wine (GE-Proton 11-14, vkd3d-proton built by this PR's script), 60 s at the title's first screen with no input. title: is the SHA-256 prefix of the lower-cased folder name, as #704's smoke_title.ps1 makes it. peak commit is 0 because Wine reports no process commit.

main:

xcl-smoke v1
commit: e50836bdf6f5c026f281d545ed86fb2f07ba6e6a
gpu: NVIDIA GeForce RTX 3080 10GB
title: 3d0ac693
seconds: 60
exit: 0x0
frames shown: 1111 (PresentX 1111)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

PR:

xcl-smoke v1
commit: 2f81a6917f57cbc208d9869fd99cf6d31aa30a29
gpu: NVIDIA GeForce RTX 3080 10GB
title: 3d0ac693
seconds: 60
exit: 0x0
frames shown: 1124 (PresentX 1124)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

  • AMD / RADV. The conversion runs before any driver sees SPIR-V, and #611's RX 9060 XT names the same program.
  • vkd3d-proton tags other than v3.1 with this dxil-spirv commit.
  • Proton Experimental's Wine; only GE-Proton 11-14.

AI use

  • Claude Code (Claude Opus 5.5): the traces, the dxil-spirv comparison, the script change, the runs and this text, on the machine of the person submitting it.

🤖 Generated with Claude Code

**@⁠gccody** on GitHub · 2026-11-24 05:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/775) `gccody:linux-dxil-spirv-guard` → `main` · +602 −2 · 10 files · 4 commits · open Stacked on #257 (its 3 commits, rebased on current `main`, are the first ones here; only the last commit is this PR). Fixes #611. On Linux, the retail title (1.0.2.1) stops presenting during world loading while a title thread is inside vkd3d-proton's DXIL → SPIR-V conversion of a translated compute program. Its memory grows until the machine runs out, or the title's GPU watchdog (`+0x23cf683`) ends it first. The cause is vkd3d-proton v3.1's dxil-spirv (`8b48f0e`). Current dxil-spirv `master` has fixed it, so `build-vkd3d-proton.sh` now builds v3.1 with its dxil-spirv submodule at `53aac41`. *(An earlier version of this PR patched v3.1's dxil-spirv to give up on these programs. It is replaced: refusing them only moved the crash, because the title needs their results.)* **What goes wrong in v3.1's dxil-spirv:** 20 of the 782 DXIL programs in XCL's cache after a world load fail. Two of them, traced with gdb, perf and temporary logging: | DXIL | what happens | |---|---| | `d0771dbcd87e4d6d` (`2e0055c25f49848a_Compute`, the one #611 names) | `while (rewrite_invalid_real_loop_breaks()) structurize(1);` never ends. Every round dispatches the same loop again (header `339.pred`, merge `52.merge`, 1 100+ rounds), adds a block (3 942 → 7 187 in 60 s), rebuilds the CFG, and leaves that round's `reachability_bitset` in the thread allocator, which never frees. Native CLI: still running at 300 s, 26 GB. In the title: 19 GB and swap full. | | `9f05e0a08e548fdd` | A transform leaves a loop header with a second back edge. `visit()` asserts against that, but release builds compile the assert out, so the edge stays in `pred` / `succ` as a forward edge. The dominator recomputation then recurses around a 12-block cycle until the stack runs out (an assert build stops at `cfg_structurizer.cpp:3452`). Likely the "two blobs crash the CLI (exit 139)" in #611, and the same crash as dxil-spirv's #320. | **What is in it** - `scripts/linux/build-vkd3d-proton.sh`: - After `vkd3d-proton-xcl.patch`, it fetches the dxil-spirv submodule's origin and checks out `DXIL_SPIRV_REF` (default `53aac41815f8203dff4e081969438ed5063dbff3`; empty keeps the tag's), then updates its submodules. - It prints the commit it builds with. A rerun on an existing work dir leaves an already-moved checkout as it is. - The per-patch check is now one `apply_once` function. - `docs/linux.md`: says so in the vkd3d-proton section. v3.1 builds against that dxil-spirv commit unchanged: same meson subproject, no vkd3d-proton source change. **Tested** - RTX 3080 10 GB (NVIDIA 580.178.04), i9-10900KF, 61 GB RAM, Ubuntu 26.04.1 (kernel 7.0). GE-Proton 11-14's Wine, DXC 1.9.2609.5, `VKD3D_CONFIG=ignore_shared_fence`, `XCL_NETWORK=0`, no network. - `build-vkd3d-proton.sh` on an empty work dir: clone, patch, dxil-spirv at `53aac418`, `d3d12.dll` + `d3d12core.dll`. A second run on the same dir: "already applied", same commit, built. - **Native dxil-spirv CLI** (`--bindless --validate`, 120 s limit per program), all 782 DXIL programs of the title's cache: | dxil-spirv | convert and validate | fail | slowest | |---|---|---|---| | v3.1's `8b48f0e` | 762 | 20: 11 crash / error, 9 still running at 120 s | > 120 s | | `53aac41` | **782** | **0** | 7.6 s (`bbdb276f717dd7a8`) | - **Retail title, 1.0.2.1**, story load started by scripted presses. XCL here is a local branch with #273, #533, #684 and #708 merged, plus two local changes (graphics pipelines get #533's bounded wait in draws and `ExecuteIndirect`; a file-driven button-press helper used to walk the menus), `XCL_BIG_COMPILES=6` (#820). - With v3.1's dxil-spirv, the title hangs in the conversion. With a version that refuses these programs instead, it crashes reading data they should have written (an empty half-float AABB, `0x7c007c00fc00fc00`, then a read at `-1`). - With `53aac41`: no thread is in dxil-spirv for long, no pipeline is refused (0 `the driver rejected the compute PSO`), and 2 383 of 16 046 dispatches were skipped at the stop (still building). - The title then ends at 271 s with `D3D12 device removed: 0x887a0005`, reported in #708's `Wait64BitValueX gate on queue`. No Xid in the kernel log. That is the next obstacle, not part of this PR. - `xcl_testtitle` under the same Wine with the new DLLs: 48 passed, 2 failed (user32 cloaking, XAudio2 XMA2 GetState: the Wine results of #175), the same as with v3.1's. **Regression run** This PR only changes `scripts/linux` and `docs/linux.md`; the runtime changes in the diff are #257's. Blocks from #257's `scripts/linux/smoke.sh` under Wine (GE-Proton 11-14, vkd3d-proton built by this PR's script), 60 s at the title's first screen with no input. `title:` is the SHA-256 prefix of the lower-cased folder name, as #704's `smoke_title.ps1` makes it. `peak commit` is 0 because Wine reports no process commit. main: ``` xcl-smoke v1 commit: e50836bdf6f5c026f281d545ed86fb2f07ba6e6a gpu: NVIDIA GeForce RTX 3080 10GB title: 3d0ac693 seconds: 60 exit: 0x0 frames shown: 1111 (PresentX 1111) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` PR: ``` xcl-smoke v1 commit: 2f81a6917f57cbc208d9869fd99cf6d31aa30a29 gpu: NVIDIA GeForce RTX 3080 10GB title: 3d0ac693 seconds: 60 exit: 0x0 frames shown: 1124 (PresentX 1124) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` **Not tested** - AMD / RADV. The conversion runs before any driver sees SPIR-V, and #611's RX 9060 XT names the same program. - vkd3d-proton tags other than v3.1 with this dxil-spirv commit. - Proton Experimental's Wine; only GE-Proton 11-14. **AI use** - Claude Code (Claude Opus 5.5): the traces, the dxil-spirv comparison, the script change, the runs and this text, on the machine of the person submitting it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- docs/linux.md: cross-build, DXC, Wine choice, prefix, patched vkd3d-proton, DXVK, running, known state
- scripts/linux: vkd3d-proton v3.1 patch and build, prefix setup, run
- preflight (Wine only): error when d3d12core.dll holds vkd3d-proton's heap vtable assertion (#241),
  warning when dxgi.dll is not DXVK's
Wine and Proton have no MSOpusDecoder.dll, so with #294 XCL loads libopus
from an opus.dll there. build-opus.sh downloads the official libopus 1.5.2
release, checks its SHA-256 and builds opus.dll with mingw-w64;
docs/linux.md says where to put it (XCL_OPUS_DIR or next to xcl.exe) and
how to tell which decoder xcl.log reports.
scripts/smoke.ps1 needs Windows (Start-Process, Get-CimInstance), so a
contributor on Linux cannot make the xcl-smoke blocks a PR that changes
the runtime needs. smoke.sh runs the title the same way under Proton's
Wine (XCL_RUN_SECONDS, XCL_ACTIVITY, networking off), reads XCL's log
and prints the same block; the GPU name comes from the log, and peak
commit reads 0 under Wine. docs/linux.md says how to use it.
vkd3d-proton v3.1's dxil-spirv (8b48f0e) cannot structure 20 of the 782 DXIL programs a retail
title compiled in its world load: rewrite_invalid_real_loop_breaks() dispatches the same loop
every round without end (one more block and a leaked reachability bitset each time, 26 GB at
300 s), or a transform leaves a loop header with a second back edge (an assert compiled out in
release) and the dominator recomputation recurses until the stack runs out. The title's thread
stays in the conversion until its GPU watchdog ends it. dxil-spirv's master (53aac41) converts
all 782 to SPIR-V that passes validation, the slowest in 7.6 s, so build-vkd3d-proton.sh moves
the submodule there (DXIL_SPIRV_REF; empty keeps the tag's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:32:09 +00:00
Author
Owner

@⁠GreemSC on GitHub · 2026-11-24 11:01 UTC · original

Test report from RDNA3 / RADV: dxil-spirv 53aac41 stops the #611 memory growth at the title screen too, where #690's preload reaches it. Same result as @⁠xstraok's on #611, from a different card and a different vkd3d-proton tree. Separately, some of my own builds crash about 49 s in, with the old dxil-spirv as well as the new one. Details below in case someone else sees the same thing.

Setup

  • RX 7900 XT (RADV, Mesa 26.2.5), i7-12700K, 16 GB RAM, CachyOS (kernel 7.3.5).
  • Proton-CachyOS Wine, with its own vkd3d-proton 0bb64c5 (dxil-spirv 8434b06).
  • XCL main 09940bb + #871 (fence proxy, so no vkd3d-proton-xcl.patch) + #684, x86_64-pc-windows-msvc release.
  • Title: Series package 1.0.2.1.
  • used-pipelines.txt held 52 keys from an earlier run that reached world loading. With these, #690's preload builds 2e0055c25f49848a_Compute while the title is still on its first screens.
  • Every run lasts 120 s with no input (intro, then the title screen).
  • Frame times come from MangoHud. The memory figures are the game scope's cgroup (memory.current + memory.swap.current).

Stock dxil-spirv (8434b06)

p99 frame frames > 100 ms RAM + swap at 120 s
preload on (default) 400 / 1072 ms 67 / 169 19.6 / 19.9 GB, still growing
XCL_PSO_PRELOAD=0 34.8 / 34.0 ms 1 / 1 5.2 / 5.0 GB, flat

(Two runs per row. The one frame left over 100 ms is the ~14 s load after the intro.)

  • A 240 s run with preload on reached 29 GB and was still growing at ~60 MB/s.
  • An LD_PRELOAD shim on mmap put every new block on one thread, xcl-pso-pre-0. That thread called NtAllocateVirtualMemory for 4 MiB pieces, about 20 a second, and never freed one.
  • On 16 GB the kernel pushes this out to swap. The hitches come from that.

dxil-spirv 53aac41, preload on. I rebuilt 0bb64c5 with only the submodule moved, -Db_ndebug=true, using my own toolchain, not this PR's script.

  • The 299 988 B compute program is built in 2.2 s on the first run. Later runs take 7–12 ms from the driver's cache.
  • The game scope's RAM + swap stays flat. In the one run that lasted 120 s, it held 4.8 GB from 40 s to 120 s. At 48 s, the five runs with this fix were at 4.8–6.3 GB, against 12.5 GB with the stock dxil-spirv.
  • In that 120 s run: p99 33.7 ms, 1 frame over 100 ms (the load after the intro), 0.39 cores of CPU after 40 s. The stock build with the preload off gives the same numbers (p99 33.7 / 33.7 ms, 0.38 / 0.39 cores).

A crash that comes from my builds, not from the dxil-spirv change

  • Built with Arch's mingw-w64 (GCC 16, UCRT by default), the title stops at 49–52 s with a write to 0 at game_scarlett_master.exe+0x2215c35. By @⁠13hourstilliland's reading in #505, this is the title's 30 s heartbeat watchdog, so something stalls the title from about 20 s on.
  • It happens with the fix and without it. A rebuild of 0bb64c5 with its own dxil-spirv (8434b06) crashes the same way, with the preload on or off.
  • A Debian trixie mingw-w64 build (GCC 14, msvcrt, the same imports as Proton's DLL) with the fix crashed in 1 of 2 runs. I built the control the same way but did not run it.
  • Over all my builds, that is 6 crashes in 9 runs of 60 s or more. Proton's own DLL gave 0 in 27 runs, on the same setup and on newer main.
  • I don't know the cause. Something in how Proton builds it (flags, toolchain) seems to matter. With a self-built DLL, it may take a few runs to tell this crash apart from the fix.
  • Without -Db_ndebug=true, the title aborts (exit code 3) at its first heap. This PR's script already sets it.

Not tested: this PR's script itself (v3.1 + vkd3d-proton-xcl.patch), world loading (this setup stops at #505), other GPUs. The title-screen side is filed as #1035.

AI use: Claude Code (Claude Opus 5.5) ran the runs, wrote the shim and the builds, and wrote this report.

**@⁠GreemSC** on GitHub · 2026-11-24 11:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7129561290) **Test report from RDNA3 / RADV: dxil-spirv `53aac41` stops the #611 memory growth at the title screen too, where #690's preload reaches it.** Same result as @⁠xstraok's on #611, from a different card and a different vkd3d-proton tree. Separately, some of my own builds crash about 49 s in, with the old dxil-spirv as well as the new one. Details below in case someone else sees the same thing. **Setup** - RX 7900 XT (RADV, Mesa 26.2.5), i7-12700K, 16 GB RAM, CachyOS (kernel 7.3.5). - Proton-CachyOS Wine, with its own vkd3d-proton `0bb64c5` (dxil-spirv `8434b06`). - XCL `main` `09940bb` + #871 (fence proxy, so no `vkd3d-proton-xcl.patch`) + #684, `x86_64-pc-windows-msvc` release. - Title: Series package 1.0.2.1. - `used-pipelines.txt` held 52 keys from an earlier run that reached world loading. With these, #690's preload builds `2e0055c25f49848a_Compute` while the title is still on its first screens. - Every run lasts 120 s with no input (intro, then the title screen). - Frame times come from MangoHud. The memory figures are the game scope's cgroup (`memory.current` + `memory.swap.current`). **Stock dxil-spirv (`8434b06`)** | | p99 frame | frames > 100 ms | RAM + swap at 120 s | |---|---|---|---| | preload on (default) | 400 / 1072 ms | 67 / 169 | 19.6 / 19.9 GB, still growing | | `XCL_PSO_PRELOAD=0` | 34.8 / 34.0 ms | 1 / 1 | 5.2 / 5.0 GB, flat | (Two runs per row. The one frame left over 100 ms is the ~14 s load after the intro.) - A 240 s run with preload on reached 29 GB and was still growing at ~60 MB/s. - An `LD_PRELOAD` shim on `mmap` put every new block on one thread, `xcl-pso-pre-0`. That thread called `NtAllocateVirtualMemory` for 4 MiB pieces, about 20 a second, and never freed one. - On 16 GB the kernel pushes this out to swap. The hitches come from that. **dxil-spirv `53aac41`, preload on.** I rebuilt `0bb64c5` with only the submodule moved, `-Db_ndebug=true`, using my own toolchain, not this PR's script. - The 299 988 B compute program is built in 2.2 s on the first run. Later runs take 7–12 ms from the driver's cache. - The game scope's RAM + swap stays flat. In the one run that lasted 120 s, it held 4.8 GB from 40 s to 120 s. At 48 s, the five runs with this fix were at 4.8–6.3 GB, against 12.5 GB with the stock dxil-spirv. - In that 120 s run: p99 33.7 ms, 1 frame over 100 ms (the load after the intro), 0.39 cores of CPU after 40 s. The stock build with the preload off gives the same numbers (p99 33.7 / 33.7 ms, 0.38 / 0.39 cores). **A crash that comes from my builds, not from the dxil-spirv change** - Built with Arch's mingw-w64 (GCC 16, UCRT by default), the title stops at 49–52 s with a write to 0 at `game_scarlett_master.exe+0x2215c35`. By @⁠13hourstilliland's reading in #505, this is the title's 30 s heartbeat watchdog, so something stalls the title from about 20 s on. - It happens with the fix and without it. A rebuild of `0bb64c5` with its own dxil-spirv (`8434b06`) crashes the same way, with the preload on or off. - A Debian trixie mingw-w64 build (GCC 14, msvcrt, the same imports as Proton's DLL) with the fix crashed in 1 of 2 runs. I built the control the same way but did not run it. - Over all my builds, that is 6 crashes in 9 runs of 60 s or more. Proton's own DLL gave 0 in 27 runs, on the same setup and on newer `main`. - I don't know the cause. Something in how Proton builds it (flags, toolchain) seems to matter. With a self-built DLL, it may take a few runs to tell this crash apart from the fix. - Without `-Db_ndebug=true`, the title aborts (exit code 3) at its first heap. This PR's script already sets it. **Not tested:** this PR's script itself (v3.1 + `vkd3d-proton-xcl.patch`), world loading (this setup stops at #505), other GPUs. The title-screen side is filed as #1035. AI use: Claude Code (Claude Opus 5.5) ran the runs, wrote the shim and the builds, and wrote this report.
Author
Owner

@⁠NicolaiVdS on GitHub · 2026-11-24 11:05 UTC · original

First run of this PR's vkd3d-proton on the newer retail title, on Linux + NVIDIA.

Tested

  • AMD Ryzen 9 9950X, NVIDIA GeForce RTX 5070 Ti (driver 620.73.04), 30 GB RAM + 7 GB swap, Arch Linux (kernel 7.3.5), GE-Proton11-5 (wine-11.0 Staging). xcl.exe cross-built in release for x86_64-pc-windows-gnu (MinGW), rustc 1.99.0.
  • scripts/linux/build-vkd3d-proton.sh from this PR's head 2f81a69: v3.1 + vkd3d-proton-xcl.patch + dxil-spirv 53aac418 builds. x86_64-w64-mingw32-widl was not installed here; Wine 11.22's widl behind a wrapper (exec widl -b x86_64-w64-mingw32 "$@") worked in its place.
  • Its d3d12.dll / d3d12core.dll were copied into an existing GE-Proton11-5 prefix (not one made with setup-prefix.sh). xcl.exe: main 09940bb + #867 (dfe1aaa) + a small local change on top of it + #684 + #794.
  • Retail title 1.0.2.1 (TitleID 7952987A), XCL_NETWORK=0:
    • With GE-Proton11-5's own vkd3d-proton v3.1: an access violation in d3d12core.dll+0x2b841 (read at 0x8) on an XCL pipeline thread while the world's compute PSOs were being built, with d3d12core.dll+0x1d2f6f over and over on the stack. Once at 92 s (XCL_PRESS_A_AT=25,40,55), and once at 14 s on the next run, with XCL's caches warm (played by hand).
    • With this PR's build (XCL_PRESS_A_AT=25,40,55): no crash in d3d12core.dll. The title went on to the #505 watchdog at 115 s (GPU Loc Sig 7333478d). Available memory stayed at 7 GB or more through 100 s.

Not tested: setup-prefix.sh and the kit's run.sh; Proton Experimental; AMD / RADV; smoke.sh; Windows.

AI use: Claude Code (Claude Opus 5.5) read the logs and the title's call site, built the branches, ran the tests and the scripted runs, and wrote this report. The runs are on my machine, on the hardware above.

**@⁠NicolaiVdS** on GitHub · 2026-11-24 11:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7129640130) First run of this PR's vkd3d-proton on the newer retail title, on Linux + NVIDIA. **Tested** - AMD Ryzen 9 9950X, NVIDIA GeForce RTX 5070 Ti (driver 620.73.04), 30 GB RAM + 7 GB swap, Arch Linux (kernel 7.3.5), GE-Proton11-5 (wine-11.0 Staging). `xcl.exe` cross-built in release for `x86_64-pc-windows-gnu` (MinGW), rustc 1.99.0. - `scripts/linux/build-vkd3d-proton.sh` from this PR's head `2f81a69`: v3.1 + `vkd3d-proton-xcl.patch` + dxil-spirv `53aac418` builds. `x86_64-w64-mingw32-widl` was not installed here; Wine 11.22's `widl` behind a wrapper (`exec widl -b x86_64-w64-mingw32 "$@"`) worked in its place. - Its `d3d12.dll` / `d3d12core.dll` were copied into an existing GE-Proton11-5 prefix (not one made with `setup-prefix.sh`). `xcl.exe`: `main` `09940bb` + #867 (`dfe1aaa`) + a small local change on top of it + #684 + #794. - Retail title 1.0.2.1 (TitleID 7952987A), `XCL_NETWORK=0`: - With GE-Proton11-5's own vkd3d-proton v3.1: an access violation in `d3d12core.dll+0x2b841` (read at `0x8`) on an XCL pipeline thread while the world's compute PSOs were being built, with `d3d12core.dll+0x1d2f6f` over and over on the stack. Once at 92 s (`XCL_PRESS_A_AT=25,40,55`), and once at 14 s on the next run, with XCL's caches warm (played by hand). - With this PR's build (`XCL_PRESS_A_AT=25,40,55`): no crash in `d3d12core.dll`. The title went on to the #505 watchdog at 115 s (`GPU Loc Sig` `7333478d`). Available memory stayed at 7 GB or more through 100 s. **Not tested:** `setup-prefix.sh` and the kit's `run.sh`; Proton Experimental; AMD / RADV; `smoke.sh`; Windows. **AI use:** Claude Code (Claude Opus 5.5) read the logs and the title's call site, built the branches, ran the tests and the scripted runs, and wrote this report. The runs are on my machine, on the hardware above.
Author
Owner

@⁠Filip722 on GitHub · 2026-11-24 11:27 UTC · original · edited 2026-11-24 11:28 UTC

I reproduced the atomics failure from #175 on an RTX 5060 Laptop GPU with driver 615.78.08, Bazzite 44 and Proton Experimental 11.0-20261112. With the 53aac41 pin proposed here and the vkd3d-proton v3.1 compatibility build, gpu_more_atomics_sub_dword_scratch_valu timed out after 10 seconds in a workspace run and the driver logged Xid 109 (CTX SWITCH TIMEOUT).

I rebuilt the same vkd3d-proton source with dxil-spirv 1dc543ffd1a8ca559e6904530802d514ac09146f, the merge of HansKristian-Work/dxil-spirv#372, and used a fresh driver cache. The Windows MSVC release test gpu_more_atomics_sub_dword_scratch_valu --nocapture then passed in 1.47 s. This tests the synthetic atomics case on the newer pin. The retail comparison on that pin is pending.

AI assistance by OpenAI Codex for the build, test and report. Model GPT-6.2-Sol (high).

**@⁠Filip722** on GitHub · 2026-11-24 11:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7130116855) · edited 2026-11-24 11:28 UTC I reproduced the atomics failure from #175 on an RTX 5060 Laptop GPU with driver 615.78.08, Bazzite 44 and Proton Experimental `11.0-20261112`. With the `53aac41` pin proposed here and the vkd3d-proton v3.1 compatibility build, `gpu_more_atomics_sub_dword_scratch_valu` timed out after 10 seconds in a workspace run and the driver logged Xid 109 (`CTX SWITCH TIMEOUT`). I rebuilt the same vkd3d-proton source with dxil-spirv `1dc543ffd1a8ca559e6904530802d514ac09146f`, the merge of HansKristian-Work/dxil-spirv#372, and used a fresh driver cache. The Windows MSVC release test `gpu_more_atomics_sub_dword_scratch_valu --nocapture` then passed in 1.47 s. This tests the synthetic atomics case on the newer pin. The retail comparison on that pin is pending. AI assistance by OpenAI Codex for the build, test and report. Model GPT-6.2-Sol (high).
Author
Owner

@⁠sander110419 on GitHub · 2026-11-24 12:03 UTC · original

Linux/Wine test (NVIDIA laptop, Ubuntu-24.04-based distro): the build script stops on an older mingw-w64 pathcch.h; a one-line guard fixes it. Built DLLs run the newer retail title; no new Xid in two game runs and a long pipeline precompile.

Written by Claude (claude-opus-5-5) through Hermes, agent of the account owner, posted with his permission. Every result below is from a Linux/Wine run, not a Windows smoke.ps1 run.

Setup

  • RTX 5070 Laptop GPU (8 GB, driver 595.104.02), 30 GB RAM, Pop!_OS 24.04 LTS.
  • GE-Proton 11-11, Wine used directly (no umu), title prefix only.
  • mingw-w64: gcc-mingw-w64-x86-64-win32 13.2.0-6ubuntu1, mingw-w64-common 11.0.1-3build1 (the Ubuntu 24.04 packages).
  • scripts/linux/build-vkd3d-proton.sh from this PR: v3.1 (4522cc1a) + vkd3d-proton-xcl.patch + dxil-spirv 53aac418.

Build failure

../libs/vkd3d-common/platform.c:291:76: error: 'PATHCCH_NONE' undeclared (first use in this function)

PATHCCH_NONE is missing from mingw-w64 11's pathcch.h; newer headers (Arch, CachyOS in the reports above) have it. Adding this after the includes in libs/vkd3d-common/platform.c was enough, and the rest of the build finished:

#ifndef PATHCCH_NONE
#define PATHCCH_NONE 0 /* older mingw-w64 pathcch.h */
#endif

It could go into vkd3d-proton-xcl.patch, or the doc could name mingw-w64 12 or later as the minimum. The packages the doc lists (meson, mingw-w64-tools for widl) were the only other things I had to install.

Runs with the built d3d12.dll / d3d12core.dll (copied into the prefix's system32)

  • Two game runs (Series S profile, XCL_PSO_WAIT_MS=1000):
    • Both reached the title screen at 30 fps and went into world loading.
    • They stopped at 175 s and 157 s.
    • The 175 s run ended with the title's own +0x23cf683 stall stop; the 157 s run (with more open PRs merged) ended with a different crash, which I'll report on #505.
    • With GE-Proton's own vkd3d-proton, the same profile had stopped at 84–119 s. These are single runs, so I'm not claiming a difference from them.
  • xcl shaders … --precompile --only CS --pipelines ran for 16 min and is still going: 750 pipelines made, 0 refused, resident memory flat at 4.2–4.4 GB.
  • dmesg: no NVIDIA Xid since the swap. Earlier, with GE-Proton's vkd3d-proton, I had Xid 109 and Xid 31 during game runs. I haven't run the gpu_more_atomics_sub_dword_scratch_valu test @⁠Filip722 mentions, so this says nothing about that case.
**@⁠sander110419** on GitHub · 2026-11-24 12:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7130902156) **Linux/Wine test (NVIDIA laptop, Ubuntu-24.04-based distro): the build script stops on an older mingw-w64 `pathcch.h`; a one-line guard fixes it. Built DLLs run the newer retail title; no new Xid in two game runs and a long pipeline precompile.** Written by Claude (claude-opus-5-5) through Hermes, agent of the account owner, posted with his permission. Every result below is from a Linux/Wine run, not a Windows `smoke.ps1` run. **Setup** - RTX 5070 Laptop GPU (8 GB, driver 595.104.02), 30 GB RAM, Pop!_OS 24.04 LTS. - GE-Proton 11-11, Wine used directly (no umu), title prefix only. - mingw-w64: `gcc-mingw-w64-x86-64-win32` 13.2.0-6ubuntu1, `mingw-w64-common` 11.0.1-3build1 (the Ubuntu 24.04 packages). - `scripts/linux/build-vkd3d-proton.sh` from this PR: v3.1 (`4522cc1a`) + `vkd3d-proton-xcl.patch` + dxil-spirv `53aac418`. **Build failure** ``` ../libs/vkd3d-common/platform.c:291:76: error: 'PATHCCH_NONE' undeclared (first use in this function) ``` `PATHCCH_NONE` is missing from mingw-w64 11's `pathcch.h`; newer headers (Arch, CachyOS in the reports above) have it. Adding this after the includes in `libs/vkd3d-common/platform.c` was enough, and the rest of the build finished: ```c #ifndef PATHCCH_NONE #define PATHCCH_NONE 0 /* older mingw-w64 pathcch.h */ #endif ``` It could go into `vkd3d-proton-xcl.patch`, or the doc could name mingw-w64 12 or later as the minimum. The packages the doc lists (`meson`, `mingw-w64-tools` for `widl`) were the only other things I had to install. **Runs with the built `d3d12.dll` / `d3d12core.dll`** (copied into the prefix's `system32`) - Two game runs (Series S profile, `XCL_PSO_WAIT_MS=1000`): - Both reached the title screen at 30 fps and went into world loading. - They stopped at 175 s and 157 s. - The 175 s run ended with the title's own `+0x23cf683` stall stop; the 157 s run (with more open PRs merged) ended with a different crash, which I'll report on #505. - With GE-Proton's own vkd3d-proton, the same profile had stopped at 84–119 s. These are single runs, so I'm not claiming a difference from them. - `xcl shaders … --precompile --only CS --pipelines` ran for 16 min and is still going: 750 pipelines made, 0 refused, resident memory flat at 4.2–4.4 GB. - `dmesg`: no NVIDIA Xid since the swap. Earlier, with GE-Proton's vkd3d-proton, I had Xid 109 and Xid 31 during game runs. I haven't run the `gpu_more_atomics_sub_dword_scratch_valu` test @⁠Filip722 mentions, so this says nothing about that case.
Author
Owner

@⁠firefloc on GitHub · 2026-11-24 18:51 UTC · original

Linux retest of the #775 pin on 77 compute shaders from an existing XCL cache

On CachyOS x86-64 and a Ryzen 7 7800X3D, I built vkd3d-proton 4522cc1a with the #257 compatibility patch and -Db_ndebug=true, using the 53aac41815f8203dff4e081969438ed5063dbff3 pin from this PR (2f81a69). Both Windows DLLs built, and their named exports and ordinals match the reference pair.

I also built native Linux Release CLIs at the old and new dxil-spirv pins. Each ran dxil-spirv <input> --bindless --validate --output /dev/null on the same 77 compute DXIL containers cached by XCL 9e3831e with DXC 1.9.2609.5. The per-input timeout was 12 s.

dxil-spirv revision Validated Failures
v3.1 pin 8b48f0e 74/77 SIGSEGV at 278,868 and 360,932 bytes, SPIR-V validation failure at 197,280 bytes
#775 pin 53aac418 77/77 0

A second pass on the old pin reproduced all three failures. This confirms a converter improvement on inputs from our run. A separate live XCL run with the old DLLs hit an AMD compute-queue timeout and a MODE1 reset. Whether these DLLs change that result remains untested. The CLI comparison ran on CPU only and did not launch the title or create Vulkan pipelines.

AI use. OpenAI Codex (GPT-6, exact variant undisclosed) built the binaries, ran the comparison and wrote this report.

**@⁠firefloc** on GitHub · 2026-11-24 18:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7141241024) **Linux retest of the #775 pin on 77 compute shaders from an existing XCL cache** On CachyOS x86-64 and a Ryzen 7 7800X3D, I built vkd3d-proton `4522cc1a` with the #257 compatibility patch and `-Db_ndebug=true`, using the `53aac41815f8203dff4e081969438ed5063dbff3` pin from this PR (`2f81a69`). Both Windows DLLs built, and their named exports and ordinals match the reference pair. I also built native Linux Release CLIs at the old and new dxil-spirv pins. Each ran `dxil-spirv <input> --bindless --validate --output /dev/null` on the same 77 compute DXIL containers cached by XCL `9e3831e` with DXC 1.9.2609.5. The per-input timeout was 12 s. | dxil-spirv revision | Validated | Failures | | --- | ---: | --- | | v3.1 pin `8b48f0e` | 74/77 | SIGSEGV at 278,868 and 360,932 bytes, SPIR-V validation failure at 197,280 bytes | | #775 pin `53aac418` | 77/77 | 0 | A second pass on the old pin reproduced all three failures. This confirms a converter improvement on inputs from our run. A separate live XCL run with the old DLLs hit an AMD compute-queue timeout and a MODE1 reset. Whether these DLLs change that result remains untested. The CLI comparison ran on CPU only and did not launch the title or create Vulkan pipelines. **AI use.** OpenAI Codex (GPT-6, exact variant undisclosed) built the binaries, ran the comparison and wrote this report.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 00:42 UTC · original

Linux + NVIDIA test of 2f81a69: scripts/linux/build-vkd3d-proton.sh built as it is on Fedora 44. On v3.1's own dxil-spirv (the script with DXIL_SPIRV_REF=) a retail title lost the two threads that build its first two big compute pipelines to a stack overflow in 2 of 2 runs and made 24 compute pipelines by 120 s; on this pull request's DLLs the first was built in 3 of 3 runs and the second in 1 of 3 (in the other two it had started 7 to 9 s before the run ended). Natively, v3.1's dxil-spirv (8b48f0e) failed on 85 of the 414 largest DXIL programs XCL has cached here and 53aac418 converted all 2,976.

Setup: Fedora 44 (kernel 7.2.9), MinGW gcc 16.2.1, meson 1.11.2, ninja 1.13.2, Ryzen 9 9950X3D, 62 GB RAM. The script and patch from 2f81a69, unchanged, on 8 cores.

  • Title runs: Wine 11.21 Staging (Wayland driver), RTX 4070 12 GB (driver 615.71.09, 32-lane waves). XCL main 689f2db + #684 (e56dbc3), release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), DXC 1.9.2609.5, XCL_NETWORK=0, XCL_PSO_PRELOAD=0, VKD3D_CONFIG=ignore_shared_fence. Retail title 1.0.2.1, the first-run screens completed once and no story progress, A on the account screen at 16 to 18 s, 120 s runs. XCL's driver-blob cache empty and NVIDIA's disk cache off (__GL_SHADER_DISK_CACHE=0) in every run. "Our kit" is what our runs normally use: vkd3d-proton v3.1-90-g30b0eb9b, dxil-spirv 34f0ff8 with its pull request 372, and a patch like #257's.
  • Native conversions: no GPU. dxil-spirv's CLI built natively (gcc 16.2.1, Release) at each commit, with vkd3d-proton's options, on the DXIL XCL cached here in two days of runs: 2,248 programs under about 256 KB and 728 of 256 KB to 2 MB. One pass each, 8 at a time.

Tested

  • build-vkd3d-proton.sh <work-dir>: exit 0 in 123 s, both DLLs made, dxil-spirv at 53aac418. With DXIL_SPIRV_REF= it builds v3.1's own (8b48f0e), with DXIL_SPIRV_REF=061225da a newer one: exit 0 in 153 s (clone included).
the title, 120 s v3.1's own dxil-spirv, 2 runs this pull request's kit, 3 runs our kit, 2 runs
driver compile of record 2e0055c25f49848a (384,860 B of DXIL) started at 81.8 and 84.7 s, never finished 22.2, 10.9, 15.8 s 11.1, 10.4 s
driver compile of record 6e148dbd563de205 (494,324 B) started at 81.8 and 84.7 s, never finished not finished at 120 s, 15.9 s, not finished 14.9, 14.4 s
virtual_setup_exception stack overflow on title threads (2 MB stacks) 2 and 2 Wine's error channel was off off
compute pipelines made by 120 s 24, 24 116, 59, 25 60, 94
last 2 s with a present 82.1, 84.1 s 90.2, 88.1, 96.2 s 88.2, 82.7 s
device removals / faults in the log 0 / 0 0 / 0 0 / 0

With this pull request's kit the two compiles that were not finished had started at 113.2 and 111.4 s, 7 to 9 s before the run ended. Presents stopped at 82.1 to 96.2 s with every kit; no run reached the title's watchdog by 120 s. The machine was busy with other work (load 9 to 12); the first run with this pull request's kit was made with about 7 GB of memory available, and a third run of our kit that started with 3 GB available is left out (its first record's build started at 103.3 s and had not finished).

Natively dxil-spirv converts the first record's DXIL in 0.3 s at 53aac418 and 0.2 s with our kit's, and 8b48f0e segfaults on both records in about a second. So nearly all of the 10 to 22 s comes after the conversion; my reading is the NVIDIA driver's compile. #611 names the same record at 284,048 B of DXIL; it is 384,860 B on this main.

dxil-spirv, natively the 728 of 256 KB to 2 MB the 2,248 smaller seconds for the 728 (per program, summed)
8b48f0e (v3.1's own) of the 414 largest: 329 convert, 59 segfault, 26 not done in 120 s (stopped there) not run –
53aac418 (this pull request) 728 convert 2,248 convert 392.6
061225da (master, 2026-11-24) 728 convert 2,248 convert 253.4
34f0ff8 + its pull request 372 (our kit) 728 convert 2,248 convert 311.4

The three that convert everything give the same SPIR-V, byte for byte, on all 2,976.

Read

  • A newer pin builds with the script too. 061225da (master, 2026-11-24) has dxil-spirv's merge of its pull request 372 (the commit @⁠Filip722 built for the atomics failure of #175) and two commits more, one of them "Use actual O(1) find for UnorderedSet/Map"; the 728 took 35 % less time on it than on 53aac418. It still has the endless recursion of #1805: natively it segfaults on 77 of the 2,682 programs main 177cd40 makes with XCL_DIRECT_DXIL=1 (53aac418 on 74 of the 2,675 under 1.84 MB). dxil-spirv's branch legacy-struct-remove (e084e35c, not in master) converts all 77 here.
  • --strip is given to meson setup (:69, :71), but the DLLs are copied from the build folder (:76), where meson has not stripped them: d3d12core.dll is 20.7 MB here and 6.9 MB after x86_64-w64-mingw32-strip. Is that meant?

Not tested: memory use with v3.1's own dxil-spirv (#611 describes growth; here the threads overflowed their stacks instead, and Wine reports no commit figure); 8b48f0e on the programs under 256 KB and on the rest of the 728; XCL_DIRECT_DXIL=1 on this kit (#1805 has that); the preload of #690 on; past 120 s; the three commits of #257 under it; the title on 061225da or e084e35c; AMD and Intel.

AI use: two Claude Code sessions (Claude Fable 5.2) on the same machine: one built the kits and ran the native conversions, the other read the commit, ran the title and wrote this comment from both.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 00:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7148787693) Linux + NVIDIA test of `2f81a69`: `scripts/linux/build-vkd3d-proton.sh` built as it is on Fedora 44. On v3.1's own dxil-spirv (the script with `DXIL_SPIRV_REF=`) a retail title lost the two threads that build its first two big compute pipelines to a stack overflow in 2 of 2 runs and made 24 compute pipelines by 120 s; on this pull request's DLLs the first was built in 3 of 3 runs and the second in 1 of 3 (in the other two it had started 7 to 9 s before the run ended). Natively, v3.1's dxil-spirv (`8b48f0e`) failed on 85 of the 414 largest DXIL programs XCL has cached here and `53aac418` converted all 2,976. **Setup:** Fedora 44 (kernel 7.2.9), MinGW gcc 16.2.1, meson 1.11.2, ninja 1.13.2, Ryzen 9 9950X3D, 62 GB RAM. The script and patch from `2f81a69`, unchanged, on 8 cores. - Title runs: Wine 11.21 Staging (Wayland driver), RTX 4070 12 GB (driver 615.71.09, 32-lane waves). XCL `main` `689f2db` + #684 (`e56dbc3`), release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), DXC 1.9.2609.5, `XCL_NETWORK=0`, `XCL_PSO_PRELOAD=0`, `VKD3D_CONFIG=ignore_shared_fence`. Retail title 1.0.2.1, the first-run screens completed once and no story progress, A on the account screen at 16 to 18 s, 120 s runs. XCL's driver-blob cache empty and NVIDIA's disk cache off (`__GL_SHADER_DISK_CACHE=0`) in every run. "Our kit" is what our runs normally use: vkd3d-proton v3.1-90-g30b0eb9b, dxil-spirv `34f0ff8` with its pull request 372, and a patch like #257's. - Native conversions: no GPU. dxil-spirv's CLI built natively (gcc 16.2.1, Release) at each commit, with vkd3d-proton's options, on the DXIL XCL cached here in two days of runs: 2,248 programs under about 256 KB and 728 of 256 KB to 2 MB. One pass each, 8 at a time. **Tested** - `build-vkd3d-proton.sh <work-dir>`: exit 0 in 123 s, both DLLs made, dxil-spirv at `53aac418`. With `DXIL_SPIRV_REF=` it builds v3.1's own (`8b48f0e`), with `DXIL_SPIRV_REF=061225da` a newer one: exit 0 in 153 s (clone included). | the title, 120 s | v3.1's own dxil-spirv, 2 runs | this pull request's kit, 3 runs | our kit, 2 runs | |---|---|---|---| | driver compile of record `2e0055c25f49848a` (384,860 B of DXIL) | started at 81.8 and 84.7 s, never finished | 22.2, 10.9, 15.8 s | 11.1, 10.4 s | | driver compile of record `6e148dbd563de205` (494,324 B) | started at 81.8 and 84.7 s, never finished | not finished at 120 s, 15.9 s, not finished | 14.9, 14.4 s | | `virtual_setup_exception stack overflow` on title threads (2 MB stacks) | 2 and 2 | Wine's error channel was off | off | | compute pipelines made by 120 s | 24, 24 | 116, 59, 25 | 60, 94 | | last 2 s with a present | 82.1, 84.1 s | 90.2, 88.1, 96.2 s | 88.2, 82.7 s | | device removals / faults in the log | 0 / 0 | 0 / 0 | 0 / 0 | With this pull request's kit the two compiles that were not finished had started at 113.2 and 111.4 s, 7 to 9 s before the run ended. Presents stopped at 82.1 to 96.2 s with every kit; no run reached the title's watchdog by 120 s. The machine was busy with other work (load 9 to 12); the first run with this pull request's kit was made with about 7 GB of memory available, and a third run of our kit that started with 3 GB available is left out (its first record's build started at 103.3 s and had not finished). Natively dxil-spirv converts the first record's DXIL in 0.3 s at `53aac418` and 0.2 s with our kit's, and `8b48f0e` segfaults on both records in about a second. So nearly all of the 10 to 22 s comes after the conversion; my reading is the NVIDIA driver's compile. #611 names the same record at 284,048 B of DXIL; it is 384,860 B on this `main`. | dxil-spirv, natively | the 728 of 256 KB to 2 MB | the 2,248 smaller | seconds for the 728 (per program, summed) | |---|---|---|---| | `8b48f0e` (v3.1's own) | of the 414 largest: 329 convert, 59 segfault, 26 not done in 120 s (stopped there) | not run | – | | `53aac418` (this pull request) | 728 convert | 2,248 convert | 392.6 | | `061225da` (`master`, 2026-11-24) | 728 convert | 2,248 convert | 253.4 | | `34f0ff8` + its pull request 372 (our kit) | 728 convert | 2,248 convert | 311.4 | The three that convert everything give the same SPIR-V, byte for byte, on all 2,976. **Read** - A newer pin builds with the script too. `061225da` (`master`, 2026-11-24) has dxil-spirv's merge of its pull request 372 (the commit @⁠Filip722 built for the atomics failure of #175) and two commits more, one of them "Use actual O(1) find for UnorderedSet/Map"; the 728 took 35 % less time on it than on `53aac418`. It still has the endless recursion of #1805: natively it segfaults on 77 of the 2,682 programs `main` `177cd40` makes with `XCL_DIRECT_DXIL=1` (`53aac418` on 74 of the 2,675 under 1.84 MB). dxil-spirv's branch `legacy-struct-remove` (`e084e35c`, not in `master`) converts all 77 here. - `--strip` is given to `meson setup` (`:69`, `:71`), but the DLLs are copied from the build folder (`:76`), where meson has not stripped them: `d3d12core.dll` is 20.7 MB here and 6.9 MB after `x86_64-w64-mingw32-strip`. Is that meant? **Not tested:** memory use with v3.1's own dxil-spirv (#611 describes growth; here the threads overflowed their stacks instead, and Wine reports no commit figure); `8b48f0e` on the programs under 256 KB and on the rest of the 728; `XCL_DIRECT_DXIL=1` on this kit (#1805 has that); the preload of #690 on; past 120 s; the three commits of #257 under it; the title on `061225da` or `e084e35c`; AMD and Intel. **AI use:** two Claude Code sessions (Claude Fable 5.2) on the same machine: one built the kits and ran the native conversions, the other read the commit, ran the title and wrote this comment from both. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 02:05 UTC · original

Follow-up to my test above, on the CPU only: with the pin moved to dxil-spirv e084e35c, the script builds (exit 0) and that dxil-spirv converts all 2,682 compute programs main 177cd40 makes with XCL_DIRECT_DXIL=1. 061225da segfaults on 77 of them (#1805).

Setup: Fedora 44, gcc 16.2.1, Ryzen 9 9950X3D, no GPU. dxil-spirv's CLI built natively (Release) at each commit, with vkd3d-proton's options. One pass each, 1 to 8 programs at a time on a machine doing other work; row one was timed about three hours before the others. Seconds are elapsed per program, summed.

dxil-spirv the 2,682 direct programs 728 cached HLSL-path programs, 256 KB to 2 MB
061225da (master) 2,604 convert, 77 segfault, 1 not done in 300 s 728 convert, 253.4 s
e084e35c (branch legacy-struct-remove) 2,682 convert, 1,210 s 728 convert, 384.7 s
e084e35c + 061225da's commit + 0naku's patch, the split-loop patch and the fourth patch from #1269 2,682 convert, 309 s 728 convert, 167.4 s
  • e084e35c is the head of a branch, not of master, and it forked before 061225da: it does not have that commit's O(1) set lookup.
  • Of the 1,210 s, 545 s is one 3.9 MB program; 061225da took 534 s on it and the patched build 3.9 s. The two 14.1 MB programs of the HLSL path took 528 s each on e084e35c; with the patches one of them took 23.6 s (1 run).
  • The two builds of the branch gave the same SPIR-V, byte for byte, on the 728 and on the 2,682.
  • spirv-val --target-env vulkan1.3 passes every output of the branch in the table except five of the direct programs, which are the same bytes and fail the same way on every dxil-spirv tried; a change on XCL's side for those is being tested.

Not tested: the DLLs the script built, under Wine or in the title; AMD and Intel; whether the branch's changes are right beyond spirv-val.

AI use: Claude Code (Claude Fable 5.2) built these, ran the conversions and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 02:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7150300617) Follow-up to my test above, on the CPU only: with the pin moved to dxil-spirv `e084e35c`, the script builds (exit 0) and that dxil-spirv converts all 2,682 compute programs `main` `177cd40` makes with `XCL_DIRECT_DXIL=1`. `061225da` segfaults on 77 of them (#1805). **Setup:** Fedora 44, gcc 16.2.1, Ryzen 9 9950X3D, no GPU. dxil-spirv's CLI built natively (Release) at each commit, with vkd3d-proton's options. One pass each, 1 to 8 programs at a time on a machine doing other work; row one was timed about three hours before the others. Seconds are elapsed per program, summed. | dxil-spirv | the 2,682 direct programs | 728 cached HLSL-path programs, 256 KB to 2 MB | |---|---|---| | `061225da` (`master`) | 2,604 convert, 77 segfault, 1 not done in 300 s | 728 convert, 253.4 s | | `e084e35c` (branch `legacy-struct-remove`) | 2,682 convert, 1,210 s | 728 convert, 384.7 s | | `e084e35c` + `061225da`'s commit + 0naku's patch, the split-loop patch and the fourth patch from #1269 | 2,682 convert, 309 s | 728 convert, 167.4 s | - `e084e35c` is the head of a branch, not of `master`, and it forked before `061225da`: it does not have that commit's O(1) set lookup. - Of the 1,210 s, 545 s is one 3.9 MB program; `061225da` took 534 s on it and the patched build 3.9 s. The two 14.1 MB programs of the HLSL path took 528 s each on `e084e35c`; with the patches one of them took 23.6 s (1 run). - The two builds of the branch gave the same SPIR-V, byte for byte, on the 728 and on the 2,682. - `spirv-val --target-env vulkan1.3` passes every output of the branch in the table except five of the direct programs, which are the same bytes and fail the same way on every dxil-spirv tried; a change on XCL's side for those is being tested. **Not tested:** the DLLs the script built, under Wine or in the title; AMD and Intel; whether the branch's changes are right beyond `spirv-val`. **AI use:** Claude Code (Claude Fable 5.2) built these, ran the conversions and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 11:08 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 11:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7160655388) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 13:27 UTC · original

Since #2120 (merged today) this script's dxil-spirv gets direct DXIL without XCL_DIRECT_DXIL too: XCL now sends compute programs with over 8 MB of HLSL to the direct translator, six in the title. On main 426a5a7, with this script's pin 53aac418, three of the six segfault in dxil-spirv and one takes 500 s. This is not specific to the pin: our own kit's 34f0ff8 segfaults on the same three and took 437 s on the fourth.

Setup: Fedora 44, Ryzen 9 9950X3D, no GPU. The six programs' DXIL from xcl shaders shaders.rpf --precompile --only cs --split 1 with XCL_DIRECT_DXIL=1 (the reroute calls the same direct_compute, pso.rs:483); --export-hlsl --min-kb 8192 on 5478c4a names the six (the same direct DXIL bytes as 426a5a7). dxil-spirv's CLI built natively at each commit, with vkd3d-proton's options; 1 run per program, on a machine doing other work.

dxil-spirv c963276f38285bf4, f839072880d49fb4, 219287eb2f6021fe 95cc13288a27a96e (2.4 MB) the other two
53aac418 (this pin) segfault 500 s 0.1 s
7c048638 (master before 061225da) segfault 503 s 0.1 s
e084e35c (branch legacy-struct-remove, whose five commits are in master 694cc674 since today) 3.9 to 4.3 s 521 s 0.1 s
694cc674 (master) 2.6 to 2.7 s 512 s 0.1 s
  • So at master 694cc674 the three convert instead of segfaulting; the fourth still takes 512 s there.
  • With our #1860 (open, bcc71b6) merged, the three convert with our kit's 34f0ff8 in 3.6 to 3.9 s; the fourth still did not finish in 300 s. With our #2076 (open, 14ae010, which conflicts with today's main) rebased onto 426a5a7 (e964ad2, local), the fourth is 1,250,960 B and converts in 0.67 s with this pin and 0.58 s with 34f0ff8.
  • Every output in the table, the three with #1860 and the fourth with #2076, passes spirv-val --target-env vulkan1.3.

Not tested: #1860 with this pin; main after 426a5a7 (#2180 changes the direct translator's output); the DLLs the script builds, under Wine or in the title; AMD and Intel.

AI use: Claude Code (Claude Opus 5.5) ran these conversions and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 13:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7163809530) Since #2120 (merged today) this script's dxil-spirv gets direct DXIL without `XCL_DIRECT_DXIL` too: XCL now sends compute programs with over 8 MB of HLSL to the direct translator, six in the title. On `main` `426a5a7`, with this script's pin `53aac418`, three of the six segfault in dxil-spirv and one takes 500 s. This is not specific to the pin: our own kit's `34f0ff8` segfaults on the same three and took 437 s on the fourth. **Setup:** Fedora 44, Ryzen 9 9950X3D, no GPU. The six programs' DXIL from `xcl shaders shaders.rpf --precompile --only cs --split 1` with `XCL_DIRECT_DXIL=1` (the reroute calls the same `direct_compute`, `pso.rs:483`); `--export-hlsl --min-kb 8192` on `5478c4a` names the six (the same direct DXIL bytes as `426a5a7`). dxil-spirv's CLI built natively at each commit, with vkd3d-proton's options; 1 run per program, on a machine doing other work. | dxil-spirv | `c963276f38285bf4`, `f839072880d49fb4`, `219287eb2f6021fe` | `95cc13288a27a96e` (2.4 MB) | the other two | |---|---|---|---| | `53aac418` (this pin) | segfault | 500 s | 0.1 s | | `7c048638` (`master` before `061225da`) | segfault | 503 s | 0.1 s | | `e084e35c` (branch `legacy-struct-remove`, whose five commits are in `master` `694cc674` since today) | 3.9 to 4.3 s | 521 s | 0.1 s | | `694cc674` (`master`) | 2.6 to 2.7 s | 512 s | 0.1 s | - So at `master` `694cc674` the three convert instead of segfaulting; the fourth still takes 512 s there. - With our #1860 (open, `bcc71b6`) merged, the three convert with our kit's `34f0ff8` in 3.6 to 3.9 s; the fourth still did not finish in 300 s. With our #2076 (open, `14ae010`, which conflicts with today's `main`) rebased onto `426a5a7` (`e964ad2`, local), the fourth is 1,250,960 B and converts in 0.67 s with this pin and 0.58 s with `34f0ff8`. - Every output in the table, the three with #1860 and the fourth with #2076, passes `spirv-val --target-env vulkan1.3`. **Not tested:** #1860 with this pin; `main` after `426a5a7` (#2180 changes the direct translator's output); the DLLs the script builds, under Wine or in the title; AMD and Intel. **AI use:** Claude Code (Claude Opus 5.5) ran these conversions and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-26 02:54 UTC · original

dxil-spirv's master moved to b540c8a2 on 2026-11-25 (14:27 UTC), and vkd3d-proton's master took it in 89439562. On main b49be183, b540c8a2 converts all 55 programs and pieces this script's pin 53aac418 segfaults on in --split 1. Of the four largest programs in --split 0, it converts the three the pin segfaults on, and the fourth in 2 s instead of 239 s.

Setup: Fedora 44, Ryzen 9 9950X3D, no GPU. main b49be183, xcl shaders shaders.rpf --precompile --only cs with XCL_DIRECT_DXIL=1: --split 1 (2,682 programs and 8,433 pieces, 32 lanes), and the four largest programs of --split 0 (the 64-lane form). Each through dxil-spirv built natively, with vkd3d-proton's other options, then spirv-val --target-env vulkan1.3. 1 pass each; the pin's --split 0 times were taken beside our other passes.

dxil-spirv --split 1: segfault --split 1: fail spirv-val --split 0: c963276f38285bf4, f839072880d49fb4, 219287eb2f6021fe --split 0: 95cc13288a27a96e (2.46 MB)
53aac418 (this pin) 55 6 segfault 238.6 s
b540c8a2 0 7 0.97 to 1.04 s 2.05 s
  • The 7 are the six the pin also gives and one piece the pin segfaults on. With our #2082's commit (cab89ed5) on b49be183, none of the 11,117 outputs fails spirv-val with b540c8a2.
  • In --split 1 on b49be183, 95cc13288a27a96e is 1,232,976 B, and the pin converts it in 0.58 s. On 426a5a7 it was 2,401,896 B, the 500 s in our comment above (13:27 UTC). In --split 0 (2,456,664 B) both builds give the same SPIR-V, byte for byte.
  • XCL's tests under Wine on lavapipe (two skipped) gave 1,425 passed, 8 failed and 47 ignored with b540c8a2 in our vkd3d-proton v3.1-90-g30b0eb9b build (with our vtable patch) and with our usual build, with the same eight failures. In the first pass, one Wine debugger that did not exit was ended after 60 s.
  • So b540c8a2 looks like the better default for DXIL_SPIRV_REF: on these programs it has none of the pin's segfaults and no 4-minute conversion. Our v3.1-90 build compiled with it; v3.1 itself was not built with it.

Not tested: this script's own build with b540c8a2 (it builds v3.1); the other 2,678 --split 0 programs; the title; a GPU; AMD and Intel.

AI use: Claude Code (Claude Opus 5.5) built dxil-spirv and vkd3d-proton, ran these conversions and XCL's tests, and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-26 02:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/775#issuecomment-7181218272) dxil-spirv's `master` moved to `b540c8a2` on 2026-11-25 (14:27 UTC), and vkd3d-proton's `master` took it in `89439562`. On `main` `b49be183`, `b540c8a2` converts all 55 programs and pieces this script's pin `53aac418` segfaults on in `--split 1`. Of the four largest programs in `--split 0`, it converts the three the pin segfaults on, and the fourth in 2 s instead of 239 s. **Setup:** Fedora 44, Ryzen 9 9950X3D, no GPU. `main` `b49be183`, `xcl shaders shaders.rpf --precompile --only cs` with `XCL_DIRECT_DXIL=1`: `--split 1` (2,682 programs and 8,433 pieces, 32 lanes), and the four largest programs of `--split 0` (the 64-lane form). Each through dxil-spirv built natively, with vkd3d-proton's other options, then `spirv-val --target-env vulkan1.3`. 1 pass each; the pin's `--split 0` times were taken beside our other passes. | dxil-spirv | `--split 1`: segfault | `--split 1`: fail `spirv-val` | `--split 0`: `c963276f38285bf4`, `f839072880d49fb4`, `219287eb2f6021fe` | `--split 0`: `95cc13288a27a96e` (2.46 MB) | |---|---|---|---|---| | `53aac418` (this pin) | 55 | 6 | segfault | 238.6 s | | `b540c8a2` | 0 | 7 | 0.97 to 1.04 s | 2.05 s | - The 7 are the six the pin also gives and one piece the pin segfaults on. With our #2082's commit (`cab89ed5`) on `b49be183`, none of the 11,117 outputs fails `spirv-val` with `b540c8a2`. - In `--split 1` on `b49be183`, `95cc13288a27a96e` is 1,232,976 B, and the pin converts it in 0.58 s. On `426a5a7` it was 2,401,896 B, the 500 s in our comment above (13:27 UTC). In `--split 0` (2,456,664 B) both builds give the same SPIR-V, byte for byte. - XCL's tests under Wine on lavapipe (two skipped) gave 1,425 passed, 8 failed and 47 ignored with `b540c8a2` in our vkd3d-proton v3.1-90-g30b0eb9b build (with our vtable patch) and with our usual build, with the same eight failures. In the first pass, one Wine debugger that did not exit was ended after 60 s. - So `b540c8a2` looks like the better default for `DXIL_SPIRV_REF`: on these programs it has none of the pin's segfaults and no 4-minute conversion. Our v3.1-90 build compiled with it; v3.1 itself was not built with it. **Not tested:** this script's own build with `b540c8a2` (it builds v3.1); the other 2,678 `--split 0` programs; the title; a GPU; AMD and Intel. **AI use:** Claude Code (Claude Opus 5.5) built dxil-spirv and vkd3d-proton, ran these conversions and XCL's tests, and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
This pull request has changes conflicting with the target branch.
  • README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/775/head:github-bot/gh-775'
git switch 'github-bot/gh-775'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-775'
git switch 'github-bot/gh-775'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-775'
git switch 'github-bot/gh-775'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-775'
git switch 'main'
git merge --squash 'github-bot/gh-775'
git switch 'main'
git merge --ff-only 'github-bot/gh-775'
git switch 'main'
git merge 'github-bot/gh-775'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.