D3D12.X: XCL_BIG_COMPILES sets how many big compute pipelines the driver builds at once #820

Open
github-bot wants to merge 1 commit from github-bot/gh-820 into main AGit
Owner

@⁠gccody on GitHub · 2026-11-24 05:59 UTC · original
gccody:d3d12x-big-compiles → main · +19 −3 · 1 files · 1 commits · open

XCL_BIG_COMPILES=N (1 – 16) lets the driver build N big compute pipelines at once, instead of always one. The default stays 1, so nothing changes unless it is set.

Background driver compiles of compute programs with ≥ 256 KiB of DXIL (BIG_DRIVER_COMPILE) go through BIG_COMPILES, a single slot that keeps the commit of a Windows machine with a small page file in bounds. Under Wine + vkd3d-proton on an RTX 3080, each of these builds takes 25 – 120 s (dxil-spirv, then the NVIDIA compiler), and the retail title's world load queued its backlog of them behind that one slot. The … ms in compute PSO with the translated console CS lines includes the time queued for the slot, because started is taken before acquire.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs:
    • Slots::most is a function. BIG_COMPILES takes big_compiles(): XCL_BIG_COMPILES, clamped to 1 – 16, read once, and logged when above 1.
    • wait_for_commit() still runs before each build, so a machine short of commit still waits per build.

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, vkd3d-proton v3.1 with #257's patch and #775's, DXC 1.9.2609.5. Rust 1.100.0, release, x86_64-pc-windows-gnu.
  • cargo test --workspace binaries run under Wine (--test-threads=4). The same failures on this branch and on main e50836b, so none of them is this change:
    • lib: 658 passed, 5 failed, 21 ignored on this branch (main: 657 / 6 / 21; the extra failure there is title_textures::gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes).
    • Failing on both: gpu_more_atomics_sub_dword_scratch_valu, placed_title_textures_share_vram_and_preserve_pixels, transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory, xma2_source_voice_decodes_and_manages_lifetime.
    • Also failing on both: e2e test_title_runs_and_game_folder_is_untouched, pls_quota (Wine has CopyFile2 in kernel32, as #175 notes), and predication_e2e set_predication_buffer_state_and_kickoff.
    • All other test binaries pass.
  • Retail title, 1.0.2.1, story load started by scripted presses. Both runs are on a local branch with #273, #533, #708 and #775 merged; with these, the title loads its world until the GPU Loc Sig watchdog (#505).
    • Default (1 slot), at 234 s: 25 471 dispatches with translated pipelines, 24 382 skipped while their pipelines were still building. The slowest builds logged were 51 – 117 s.
    • XCL_BIG_COMPILES=6, at 234 s: 17 486 dispatches, 6 708 skipped; the 502 KB program built in 25 s. Process RSS stayed under 16 GB on the 61 GB machine.
    • Neither run reaches the world: the title still stops on #505 / other crashes. This only shortens the backlog.

Regression run
scripts/linux/smoke.sh from #257 under Wine (GE-Proton 11-14), 60 s at the title's first screen, XCL_BIG_COMPILES unset. 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: d208e14b765f469f4b56301b78afa8dac5378339
gpu: NVIDIA GeForce RTX 3080 10GB
title: 3d0ac693
seconds: 60
exit: 0x0
frames shown: 1127 (PresentX 1127)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

PR:

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

Not tested

  • Windows. The default is unchanged there. With N > 1, each big build still waits for 3 GB of free commit first.
  • Values other than 1 and 6.

AI use

  • Claude Code (Claude Opus 5.5): the change, the runs, the measurements and this text, on the machine of the person submitting it.

🤖 Generated with Claude Code

**@⁠gccody** on GitHub · 2026-11-24 05:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/820) `gccody:d3d12x-big-compiles` → `main` · +19 −3 · 1 files · 1 commits · open `XCL_BIG_COMPILES=N` (1 – 16) lets the driver build N big compute pipelines at once, instead of always one. The default stays 1, so nothing changes unless it is set. Background driver compiles of compute programs with ≥ 256 KiB of DXIL (`BIG_DRIVER_COMPILE`) go through `BIG_COMPILES`, a single slot that keeps the commit of a Windows machine with a small page file in bounds. Under Wine + vkd3d-proton on an RTX 3080, each of these builds takes 25 – 120 s (dxil-spirv, then the NVIDIA compiler), and the retail title's world load queued its backlog of them behind that one slot. The `… ms` in `compute PSO with the translated console CS` lines includes the time queued for the slot, because `started` is taken before `acquire`. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: - `Slots::most` is a function. `BIG_COMPILES` takes `big_compiles()`: `XCL_BIG_COMPILES`, clamped to 1 – 16, read once, and logged when above 1. - `wait_for_commit()` still runs before each build, so a machine short of commit still waits per build. **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, vkd3d-proton v3.1 with #257's patch and #775's, DXC 1.9.2609.5. Rust 1.100.0, release, `x86_64-pc-windows-gnu`. - `cargo test --workspace` binaries run under Wine (`--test-threads=4`). The same failures on this branch and on `main` `e50836b`, so none of them is this change: - lib: 658 passed, 5 failed, 21 ignored on this branch (`main`: 657 / 6 / 21; the extra failure there is `title_textures::gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes`). - Failing on both: `gpu_more_atomics_sub_dword_scratch_valu`, `placed_title_textures_share_vram_and_preserve_pixels`, `transitions_apply_when_their_list_is_submitted`, `d32s8_targets_take_their_own_size_of_video_memory`, `xma2_source_voice_decodes_and_manages_lifetime`. - Also failing on both: `e2e` `test_title_runs_and_game_folder_is_untouched`, `pls_quota` (Wine has `CopyFile2` in kernel32, as #175 notes), and `predication_e2e` `set_predication_buffer_state_and_kickoff`. - All other test binaries pass. - **Retail title, 1.0.2.1**, story load started by scripted presses. Both runs are on a local branch with #273, #533, #708 and #775 merged; with these, the title loads its world until the `GPU Loc Sig` watchdog (#505). - Default (1 slot), at 234 s: 25 471 dispatches with translated pipelines, **24 382 skipped** while their pipelines were still building. The slowest builds logged were 51 – 117 s. - `XCL_BIG_COMPILES=6`, at 234 s: 17 486 dispatches, **6 708 skipped**; the 502 KB program built in 25 s. Process RSS stayed under 16 GB on the 61 GB machine. - Neither run reaches the world: the title still stops on #505 / other crashes. This only shortens the backlog. **Regression run** `scripts/linux/smoke.sh` from #257 under Wine (GE-Proton 11-14), 60 s at the title's first screen, `XCL_BIG_COMPILES` unset. `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: d208e14b765f469f4b56301b78afa8dac5378339 gpu: NVIDIA GeForce RTX 3080 10GB title: 3d0ac693 seconds: 60 exit: 0x0 frames shown: 1127 (PresentX 1127) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` PR: ``` xcl-smoke v1 commit: 0488eceb1f4c6a503b5a1559531aba156dad1202 gpu: NVIDIA GeForce RTX 3080 10GB title: 3d0ac693 seconds: 60 exit: 0x0 frames shown: 1131 (PresentX 1131) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` **Not tested** - Windows. The default is unchanged there. With N > 1, each big build still waits for 3 GB of free commit first. - Values other than 1 and 6. **AI use** - Claude Code (Claude Opus 5.5): the change, the runs, the measurements and this text, on the machine of the person submitting it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Background driver compiles of compute programs of 256 KiB or more of DXIL go through one slot,
which keeps the commit of a Windows machine with a small page file in bounds. Under Wine +
vkd3d-proton on an RTX 3080 those builds take 25 - 120 s each (dxil-spirv, then the driver), and a
retail title's world load queued its backlog behind that single slot: at 234 s, 24 382 of 25 471
dispatches were skipped while their pipelines were still building. XCL_BIG_COMPILES (1 - 16,
default 1, unchanged) lets a machine with the memory for it build several at once; with 6, 6 708 of
17 486 were skipped at the same point.

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

@⁠MesshM on GitHub · 2026-11-24 06:06 UTC · original

Test run of 0488eceb1f4c6a503b5a1559531aba156dad1202 on AMD RDNA4. I merged it onto current main beaa245 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 713 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 672 passed, 0 failed, 21 ignored
  • 0 SKIPPED; all tests pass with the variable unset (default 1).

Review: XCL_BIG_COMPILES is read once into a OnceLock and clamped to 1–16, and the default stays 1, so nothing changes unless it is set. Raising it trades commit headroom for compile throughput on machines with a small page file, which the description says. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 06:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7123595965) Test run of `0488eceb1f4c6a503b5a1559531aba156dad1202` on AMD RDNA4. I merged it onto current `main` `beaa245` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **713 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 672 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; all tests pass with the variable unset (default 1). **Review:** `XCL_BIG_COMPILES` is read once into a `OnceLock` and clamped to 1–16, and the default stays 1, so nothing changes unless it is set. Raising it trades commit headroom for compile throughput on machines with a small page file, which the description says. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠mastrr9 on GitHub · 2026-11-24 06:18 UTC · original

Clean-room build, audit, and native hardware test run on NVIDIA RTX 5080 (Windows 11 Pro 25H2 26200.9974, driver 617.42 / 32.0.16.1742, rustc 1.100.0, DXC Windows SDK 10.0.26100.0).

  • Commit tested: 0488eceb1f4c6a503b5a1559531aba156dad1202
  • Build (cargo build --workspace): clean (only the pre-existing fetch_update deprecation warning).
  • Tests (cargo test --workspace -- --test-threads=4): 704 passed; 0 failed; 41 ignored (SKIPPED: only the 2 hardware no wave64 tests).
  • Audit: Clean — XCL_BIG_COMPILES is parsed once via OnceLock, clamped to 1..=16, and defaults to 1 preserving existing behavior.

(Clean-room hardware check only; no retail title or smoke.ps1 run. Assisted-by: Antigravity / Claude Sonnet 5.5 + Gemini 4 Neon)

**@⁠mastrr9** on GitHub · 2026-11-24 06:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7123793201) Clean-room build, audit, and native hardware test run on NVIDIA RTX 5080 (Windows 11 Pro 25H2 `26200.9974`, driver `617.42` / `32.0.16.1742`, `rustc 1.100.0`, DXC Windows SDK `10.0.26100.0`). - **Commit tested:** `0488eceb1f4c6a503b5a1559531aba156dad1202` - **Build (`cargo build --workspace`):** clean (only the pre-existing `fetch_update` deprecation warning). - **Tests (`cargo test --workspace -- --test-threads=4`):** **`704 passed; 0 failed; 41 ignored`** (`SKIPPED`: only the 2 hardware `no wave64` tests). - **Audit:** Clean — `XCL_BIG_COMPILES` is parsed once via `OnceLock`, clamped to `1..=16`, and defaults to `1` preserving existing behavior. *(Clean-room hardware check only; no retail title or `smoke.ps1` run. Assisted-by: Antigravity / Claude Sonnet 5.5 + Gemini 4 Neon)*
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 07:09 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@beaa245:

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
exit 0; 0 failed

the buffer-mirror bookkeeping in real.rs is green here and the workspace keeps its verdict (737 passed on main on this box). Tree restored afterwards; hardware adapter, no Wine, no game data.

AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 07:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7124681423) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@beaa245`: ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 exit 0; 0 failed ``` the buffer-mirror bookkeeping in real.rs is green here and the workspace keeps its verdict (737 passed on `main` on this box). Tree restored afterwards; hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠iggyvilla on GitHub · 2026-11-24 07:34 UTC · original

Read of 0488ece (not built or run by me), one point about the commit guard when XCL_BIG_COMPILES is above 1.

wait_for_commit (real.rs:3339) waits until 3 GiB of page file are free, and its comment says each big compile takes about 1.5 GB. It is called once per build right after acquire (:3401-3404), and with one slot that is a real guard: the check and the compile never overlap with another compile. With N slots, N workers can each take a slot, each see the same 3 GiB free, and each start a ~1.5 GB compile, so the free commit can fall about (N-1) x 1.5 GB below the 3 GiB the guard was written to keep. The PR text says the guard "still runs before each build", which holds, but each check is made without counting the builds that passed it a moment before and have not allocated yet. On the small-page-file machines the single slot protects, XCL_BIG_COMPILES=4 or more can therefore run the title out of commit while the guard reports plenty.

The DXC pool already counts this: dxc::wait_for_memory (gpu/recomp/dxc.rs:415-433) needs reserve + WORKING GiB, where WORKING is the number of compiles that passed and are running. Doing the same here (needing 3 GiB + running x 1.5 GiB, and counting a build as running from the moment it passes the check until its driver call returns) would keep the default at its present behaviour and make larger values safe by the same rule. The default of 1 is unchanged either way, so this only matters for people who raise it.

AI use: read with Claude Code, Claude Sonnet 5.5, against the PR head and main; the point is mine.

**@⁠iggyvilla** on GitHub · 2026-11-24 07:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7125142582) Read of `0488ece` (not built or run by me), one point about the commit guard when `XCL_BIG_COMPILES` is above 1. `wait_for_commit` (`real.rs:3339`) waits until 3 GiB of page file are free, and its comment says each big compile takes about 1.5 GB. It is called once per build right after `acquire` (`:3401-3404`), and with one slot that is a real guard: the check and the compile never overlap with another compile. With N slots, N workers can each take a slot, each see the same 3 GiB free, and each start a ~1.5 GB compile, so the free commit can fall about `(N-1) x 1.5 GB` below the 3 GiB the guard was written to keep. The PR text says the guard "still runs before each build", which holds, but each check is made without counting the builds that passed it a moment before and have not allocated yet. On the small-page-file machines the single slot protects, `XCL_BIG_COMPILES=4` or more can therefore run the title out of commit while the guard reports plenty. The DXC pool already counts this: `dxc::wait_for_memory` (`gpu/recomp/dxc.rs:415-433`) needs `reserve + WORKING` GiB, where `WORKING` is the number of compiles that passed and are running. Doing the same here (needing `3 GiB + running x 1.5 GiB`, and counting a build as running from the moment it passes the check until its driver call returns) would keep the default at its present behaviour and make larger values safe by the same rule. The default of 1 is unchanged either way, so this only matters for people who raise it. **AI use:** read with Claude Code, Claude Sonnet 5.5, against the PR head and `main`; the point is mine.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 08:09 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head 0488ece onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 708 passed, 7 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows - zero flakes in this lane. XCL_BIG_COMPILES tests green (708 passed, zero flakes).

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7125796909) Linux / AMD RDNA3 datapoint. **Merged state:** head `0488ece` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **708 passed, 7 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows - zero flakes in this lane. `XCL_BIG_COMPILES` tests green (708 passed, zero flakes). **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠Alm0stSurely on GitHub · 2026-11-24 11:59 UTC · original

On Linux with an RTX 5080 (NVIDIA 620.73.04, Proton Experimental 11), increasing the background compile limit moved a reproducible loading checkpoint. I tested 0488ece on 47efa2e with fresh caches, the same 25 shader-set history entries, and the default unbounded PSO wait.

I counted successful waits on distinct events in the first batch of 128. With one compile slot, four waits completed. With four slots, 31 waits completed in each of two runs. For one 526,180-byte compute pipeline, time waiting for a compile slot dropped from 32.98 seconds to under 1 ms. In the repeat, the compute dispatch skip counter stayed at zero through the crash.

A follow-up held the limit at four and expanded the history to 41 entries. In one run, 48 waits completed with zero compute dispatches skipped. The 49th remained pending. The furthest visible screen in these tests was still the loading artwork, followed by the guest null write at module offset +0x23cf683. The repeatable improvement here is in loading progress; the 48-wait result has one observation so far.

AI-assisted testing and reporting with OpenAI Codex.

**@⁠Alm0stSurely** on GitHub · 2026-11-24 11:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7130808394) On Linux with an RTX 5080 (NVIDIA 620.73.04, Proton Experimental 11), increasing the background compile limit moved a reproducible loading checkpoint. I tested 0488ece on 47efa2e with fresh caches, the same 25 shader-set history entries, and the default unbounded PSO wait. I counted successful waits on distinct events in the first batch of 128. With one compile slot, four waits completed. With four slots, 31 waits completed in each of two runs. For one 526,180-byte compute pipeline, time waiting for a compile slot dropped from 32.98 seconds to under 1 ms. In the repeat, the compute dispatch skip counter stayed at zero through the crash. A follow-up held the limit at four and expanded the history to 41 entries. In one run, 48 waits completed with zero compute dispatches skipped. The 49th remained pending. The furthest visible screen in these tests was still the loading artwork, followed by the guest null write at module offset `+0x23cf683`. The repeatable improvement here is in loading progress; the 48-wait result has one observation so far. AI-assisted testing and reporting with OpenAI Codex.
Author
Owner

@⁠Filip722 on GitHub · 2026-11-24 12:44 UTC · original

I tested both settings on an RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08), Intel Core 7 240H, Bazzite 44 and Proton Experimental 11.0-20261112. XCL main 47efa2e had this PR, #640/#782/#793/#1123/#889 and a local nonlocal texture-pool experiment from #175. Both sessions used the same prefix and shader cache, temporary NVMe swap and XCL_PSO_WAIT_MS=5000.

The one-slot run recorded 2,444 sampled presents and zero DirectStorage failures through 80,736 executions. The two-slot run confirmed XCL_BIG_COMPILES=2 in the log and recorded 2,596 sampled presents with 2 failures through 81,082 executions. Both ended at the same title watchdog-associated exception after 14 consecutive samples with zero presents. These are sequential runs with a warming cache. Playable world entry remains unverified.

OpenAI Codex with GPT-6.2-Sol high assisted with the tests and report.

**@⁠Filip722** on GitHub · 2026-11-24 12:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7131862065) I tested both settings on an RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08), Intel Core 7 240H, Bazzite 44 and Proton Experimental `11.0-20261112`. XCL main `47efa2e` had this PR, #640/#782/#793/#1123/#889 and a local nonlocal texture-pool experiment from #175. Both sessions used the same prefix and shader cache, temporary NVMe swap and `XCL_PSO_WAIT_MS=5000`. The one-slot run recorded 2,444 sampled presents and zero DirectStorage failures through 80,736 executions. The two-slot run confirmed `XCL_BIG_COMPILES=2` in the log and recorded 2,596 sampled presents with 2 failures through 81,082 executions. Both ended at the same title watchdog-associated exception after 14 consecutive samples with zero presents. These are sequential runs with a warming cache. Playable world entry remains unverified. OpenAI Codex with GPT-6.2-Sol high assisted with the tests and report.
Author
Owner

@⁠einfachama on GitHub · 2026-11-24 18:09 UTC · original

Test report for #820 at 0488ece on Windows, merged locally onto main 930e8b4, on my retail title's world load. With XCL_BIG_COMPILES=3 the title stops at the same place and time as without it: the watchdog at +0x23cf683, ~60 s after its world load starts. On this machine the slot count is not what holds the title back: most long waits are a bind building a still-queued pipeline itself, and the rest are single big builds that take 30 s or more in the driver whatever the slot count.

Merge onto current main

  • main now has 25c6f7e, which replaced Slots::acquire and wait_for_commit with big_compile_turn. In it, a big build no bind waits for still takes a slot and waits for 3 GB of free commit, but a build a bind waits for skips both. So #820 conflicts in the slot code. I resolved it minimally:
    • dropped acquire, which has no caller left;
    • kept main's big_compile_turn and its wanted path, with its slot check reading (slots.most)();
    • took #820's most: fn() -> usize and big_compiles() unchanged;
    • changed the two big_compile_tests slots from most: 1 to most: || 1.
  • So on current main, XCL_BIG_COMPILES sets how many big builds go ahead at once. Builds a bind waits for were never limited by the slot there.
  • On current main the … ms of compute PSO with the translated console CS no longer includes the time spent in the slot queue (25c6f7e), unlike on e50836b where the description was written.
  • cargo test -p xcl --lib big_compile: 2 passed, 0 failed. cargo test -p xcl --lib pso_async: 7 passed, 0 failed. The whole suite was not run on this merge.

Setup

  • NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves only), Ryzen 7 5800X, 32 GB RAM, commit limit 63.9 GB, Windows 11 Pro 26300, Rust 1.100.0, release builds.
  • Both builds are main 930e8b4 + #899 f3b7dd6 + one local log line, not part of any PR. The line logs, at the start of each wait at a bind for a pipeline not built yet, what it waits for: the bind's own build, or which thread holds it, and the DXIL size once known. B adds #820.
  • My retail title, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_RUN_SECONDS=420, XCL_THREAD_DUMP_AT=100,130, A pressed at 26 s and 30 s; the world load starts by itself.
  • Order A B B A A B, B with XCL_BIG_COMPILES=3 (the run logs up to 3 big compute pipelines built by the driver at once). Before every run the same cold snapshot of the shader caches was restored:
    • XCL's DXIL, translated and driver-blob caches and the list of pipelines an earlier run used (444 shader sets);
    • the NVIDIA driver's shader cache and the D3D12 shader cache.

Results

run world load start +0x23cf683 after the load start longest wait open at the stop longest wait that returned (#899) peak commit lowest free commit
A 1 126.4 s 186.7 s 60.3 s 24.3 s, the bind's own build 5.2 s 29.7 GB 22.1 GB
B 1 68.1 s 131.7 s 63.6 s 30.4 s, a preload worker's build of 928 928 B DXIL 9.3 s 29.7 GB 22.3 GB
A 2 68.1 s 125.7 s 57.6 s 23.4 s, own build 6.0 s 29.1 GB 23.0 GB
A 3 66.1 s 125.7 s 59.7 s 22.3 s, own build 6.8 s 29.8 GB 21.9 GB
B 3 68.2 s 126.7 s 58.6 s 22.5 s, own build 6.9 s 29.9 GB 22.0 GB
B 4 68.1 s 128.7 s 60.7 s 23.9 s, own build 6.4 s 29.7 GB 23.0 GB
  • B run 2 is left out: the title stayed on its menus for the whole 420 s and never started its world load (exit 0, 16.7 GB peak). B 4 replaces it (same cold snapshot, run after the others), so B has 3 loading runs.
  • A 1's load started 60 s late; relative to the load start it is like the others. A fourth A run with the same snapshot: 59.6 s, ending in a 30.4 s wait on the same 928 928 B build.
  • Every loading run ended at +0x23cf683 (exit 0xc0000005, write at address 0) after 28–30 s without a present. No device removal, no E_OUTOFMEMORY.
  • Available physical memory was logged only from B 4 on: it went down to 2.5 GB there, and to 1.5–3.1 GB in the A runs below (32 GB of RAM).
  • What changed with 3 slots:
    • The earlier-run list's six big programs of 366–591 KB DXIL had no driver blob in the snapshot. With 3 slots they were done by 41–46 s instead of 72–77 s.
    • But then the three preload workers took the next big ones together: 709, 768, 804 and 928 KB. Each took longer side by side, e.g. 804 KB in 75.8 s against 55.1 s alone, and 768 KB in 77 s.
    • Big-program driver time per run: 109–172 s against 69–146 s.
    • Peak commit (29.7–29.9 GB against 29.1–29.8 GB) and lowest free commit (22.0–23.0 GB against 21.9–23.0 GB) are the same within the spread.
  • What holds the title back, the same with and without:
    • From the last present to the stop, two of the title's threads each wait ~29–30 s at their binds, one wait after another.
    • Of the compute waits from 94 s on, 110–117 per run are the bind building the pipeline itself, and 0–1 are held by a worker.
    • All of them are pipelines from shader sets an earlier run used, still queued for the preload workers. Those workers are busy with the big programs.
    • The run ends either with one long own build (22–24 s) or with a single 30.4 s wait for a preload worker's 928 KB build (B 1 and the fourth A run). Beside it, a graphics bind waits 17–22 s for a worker in every run in this table.
    • By 99.4 s, the B runs had 86–88 compute waits and the A runs 88–91, so 3 slots did not get the preload to those pipelines before the title needed them.
  • Warm, for comparison (A only, no #820): after one more cold A run, two A runs with the caches each previous run had left, no restore in between.
    • Both still stopped at +0x23cf683: 57.7 s and 61.1 s after the load start (the cold one 62.6 s).
    • The warm caches did remove the earlier-run list's compute builds from the stall. By the stall's start, the binds had waited 113 and 100 times for 0.5 s and 0.7 s in all, against 117 times for 14.4 s cold. 18 of 20 and 20 of 21 big programs came from driver blobs.
    • The 30 s were filled by a few long builds that no earlier run had finished:
      • warm 1: a 510 KB program compiled on a title thread for 18.2 s, then another of the thread's own builds still in the driver at the stop; beside them, a chain of graphics binds waiting for workers, 29.6 s in all;
      • warm 2: a graphics bind waiting 29.3 s for a worker, and an own build of a pipeline no earlier run had used, open 22.5 s at the stop.
    • A run that ends at the watchdog keeps driver blobs only of the builds it finished (178 → 190 → 192 → 203 here), so the program in flight at the stop is compiled again the next time.

Not tested

  • The whole test suite on this merge. AMD, Intel, Wine, other titles; values other than 1 and 3.
  • A machine short of commit: here ≥ 21.9 GB stayed free, so the 3 GB check never held a build back.
  • XCL_BIG_COMPILES=3 with warm driver blobs (the warm runs above are without #820).
  • main after #680 (memory windows from the descriptor heap, merged after these runs, opt-in with XCL_HEAP_WINDOWS=1): with it on, the translated DXIL changes, so the sizes and driver times here are for 930e8b4 and the switch form.

AI use

  • Claude Code (Claude Opus 5.5) resolved the merge conflict, added the local wait log, ran the builds, tests and runs, counted the results from the logs and thread dumps, and wrote this report; I checked it before posting.
**@⁠einfachama** on GitHub · 2026-11-24 18:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7140233944) Test report for #820 at `0488ece` on Windows, merged locally onto `main` `930e8b4`, on my retail title's world load. With `XCL_BIG_COMPILES=3` the title stops at the same place and time as without it: the watchdog at `+0x23cf683`, ~60 s after its world load starts. On this machine the slot count is not what holds the title back: most long waits are a bind building a still-queued pipeline itself, and the rest are single big builds that take 30 s or more in the driver whatever the slot count. **Merge onto current `main`** - `main` now has 25c6f7e, which replaced `Slots::acquire` and `wait_for_commit` with `big_compile_turn`. In it, a big build no bind waits for still takes a slot and waits for 3 GB of free commit, but a build a bind waits for skips both. So #820 conflicts in the slot code. I resolved it minimally: - dropped `acquire`, which has no caller left; - kept `main`'s `big_compile_turn` and its `wanted` path, with its slot check reading `(slots.most)()`; - took #820's `most: fn() -> usize` and `big_compiles()` unchanged; - changed the two `big_compile_tests` slots from `most: 1` to `most: || 1`. - So on current `main`, `XCL_BIG_COMPILES` sets how many big builds go *ahead* at once. Builds a bind waits for were never limited by the slot there. - On current `main` the `… ms` of `compute PSO with the translated console CS` no longer includes the time spent in the slot queue (25c6f7e), unlike on `e50836b` where the description was written. - `cargo test -p xcl --lib big_compile`: 2 passed, 0 failed. `cargo test -p xcl --lib pso_async`: 7 passed, 0 failed. The whole suite was not run on this merge. **Setup** - NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves only), Ryzen 7 5800X, 32 GB RAM, commit limit 63.9 GB, Windows 11 Pro 26300, Rust 1.100.0, release builds. - Both builds are `main` `930e8b4` + #899 `f3b7dd6` + one local log line, not part of any PR. The line logs, at the start of each wait at a bind for a pipeline not built yet, what it waits for: the bind's own build, or which thread holds it, and the DXIL size once known. B adds #820. - My retail title, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, `XCL_RUN_SECONDS=420`, `XCL_THREAD_DUMP_AT=100,130`, A pressed at 26 s and 30 s; the world load starts by itself. - Order A B B A A B, B with `XCL_BIG_COMPILES=3` (the run logs `up to 3 big compute pipelines built by the driver at once`). Before every run the same cold snapshot of the shader caches was restored: - XCL's DXIL, translated and driver-blob caches and the list of pipelines an earlier run used (444 shader sets); - the NVIDIA driver's shader cache and the D3D12 shader cache. **Results** | run | world load start | `+0x23cf683` | after the load start | longest wait open at the stop | longest wait that returned (#899) | peak commit | lowest free commit | |---|---:|---:|---:|---|---:|---:|---:| | A 1 | 126.4 s | 186.7 s | 60.3 s | 24.3 s, the bind's own build | 5.2 s | 29.7 GB | 22.1 GB | | B 1 | 68.1 s | 131.7 s | 63.6 s | 30.4 s, a preload worker's build of 928 928 B DXIL | 9.3 s | 29.7 GB | 22.3 GB | | A 2 | 68.1 s | 125.7 s | 57.6 s | 23.4 s, own build | 6.0 s | 29.1 GB | 23.0 GB | | A 3 | 66.1 s | 125.7 s | 59.7 s | 22.3 s, own build | 6.8 s | 29.8 GB | 21.9 GB | | B 3 | 68.2 s | 126.7 s | 58.6 s | 22.5 s, own build | 6.9 s | 29.9 GB | 22.0 GB | | B 4 | 68.1 s | 128.7 s | 60.7 s | 23.9 s, own build | 6.4 s | 29.7 GB | 23.0 GB | - B run 2 is left out: the title stayed on its menus for the whole 420 s and never started its world load (exit 0, 16.7 GB peak). B 4 replaces it (same cold snapshot, run after the others), so B has 3 loading runs. - A 1's load started 60 s late; relative to the load start it is like the others. A fourth A run with the same snapshot: 59.6 s, ending in a 30.4 s wait on the same 928 928 B build. - Every loading run ended at `+0x23cf683` (exit `0xc0000005`, write at address 0) after 28–30 s without a present. No device removal, no `E_OUTOFMEMORY`. - Available physical memory was logged only from B 4 on: it went down to 2.5 GB there, and to 1.5–3.1 GB in the A runs below (32 GB of RAM). - **What changed with 3 slots:** - The earlier-run list's six big programs of 366–591 KB DXIL had no driver blob in the snapshot. With 3 slots they were done by 41–46 s instead of 72–77 s. - But then the three preload workers took the next big ones together: 709, 768, 804 and 928 KB. Each took longer side by side, e.g. 804 KB in 75.8 s against 55.1 s alone, and 768 KB in 77 s. - Big-program driver time per run: 109–172 s against 69–146 s. - Peak commit (29.7–29.9 GB against 29.1–29.8 GB) and lowest free commit (22.0–23.0 GB against 21.9–23.0 GB) are the same within the spread. - **What holds the title back, the same with and without:** - From the last present to the stop, two of the title's threads each wait ~29–30 s at their binds, one wait after another. - Of the compute waits from 94 s on, 110–117 per run are the bind building the pipeline itself, and 0–1 are held by a worker. - All of them are pipelines from shader sets an earlier run used, still queued for the preload workers. Those workers are busy with the big programs. - The run ends either with one long own build (22–24 s) or with a single 30.4 s wait for a preload worker's 928 KB build (B 1 and the fourth A run). Beside it, a graphics bind waits 17–22 s for a worker in every run in this table. - By 99.4 s, the B runs had 86–88 compute waits and the A runs 88–91, so 3 slots did not get the preload to those pipelines before the title needed them. - **Warm, for comparison (A only, no #820):** after one more cold A run, two A runs with the caches each previous run had left, no restore in between. - Both still stopped at `+0x23cf683`: 57.7 s and 61.1 s after the load start (the cold one 62.6 s). - The warm caches did remove the earlier-run list's compute builds from the stall. By the stall's start, the binds had waited 113 and 100 times for 0.5 s and 0.7 s in all, against 117 times for 14.4 s cold. 18 of 20 and 20 of 21 big programs came from driver blobs. - The 30 s were filled by a few long builds that no earlier run had finished: - warm 1: a 510 KB program compiled on a title thread for 18.2 s, then another of the thread's own builds still in the driver at the stop; beside them, a chain of graphics binds waiting for workers, 29.6 s in all; - warm 2: a graphics bind waiting 29.3 s for a worker, and an own build of a pipeline no earlier run had used, open 22.5 s at the stop. - A run that ends at the watchdog keeps driver blobs only of the builds it finished (178 → 190 → 192 → 203 here), so the program in flight at the stop is compiled again the next time. **Not tested** - The whole test suite on this merge. AMD, Intel, Wine, other titles; values other than 1 and 3. - A machine short of commit: here ≥ 21.9 GB stayed free, so the 3 GB check never held a build back. - `XCL_BIG_COMPILES=3` with warm driver blobs (the warm runs above are without #820). - `main` after #680 (memory windows from the descriptor heap, merged after these runs, opt-in with `XCL_HEAP_WINDOWS=1`): with it on, the translated DXIL changes, so the sizes and driver times here are for `930e8b4` and the switch form. **AI use** - Claude Code (Claude Opus 5.5) resolved the merge conflict, added the local wait log, ran the builds, tests and runs, counted the results from the logs and thread dumps, and wrote this report; I checked it before posting.
Author
Owner

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

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 10:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/820#issuecomment-7160199030) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/real.rs
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/820/head:github-bot/gh-820'
git switch 'github-bot/gh-820'

Merge

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