D3D12.X: XCL_BIG_COMPILES sets how many big compute pipelines the driver builds at once #820
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!820
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-820"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@gccody on GitHub · 2026-11-24 05:59 UTC · original
gccody:d3d12x-big-compiles→main· +19 −3 · 1 files · 1 commits · openXCL_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 throughBIG_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… msincompute PSO with the translated console CSlines includes the time queued for the slot, becausestartedis taken beforeacquire.What is in it
crates/xcl/src/hle/d3d12x/real.rs:Slots::mostis a function.BIG_COMPILEStakesbig_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
x86_64-pc-windows-gnu.cargo test --workspacebinaries run under Wine (--test-threads=4). The same failures on this branch and onmaine50836b, so none of them is this change:main: 657 / 6 / 21; the extra failure there istitle_textures::gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes).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.e2etest_title_runs_and_game_folder_is_untouched,pls_quota(Wine hasCopyFile2in kernel32, as #175 notes), andpredication_e2eset_predication_buffer_state_and_kickoff.GPU Loc Sigwatchdog (#505).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.Regression run
scripts/linux/smoke.shfrom #257 under Wine (GE-Proton 11-14), 60 s at the title's first screen,XCL_BIG_COMPILESunset.title:is the SHA-256 prefix of the lower-cased folder name, as #704'ssmoke_title.ps1makes it.peak commitis 0 because Wine reports no process commit.main:
PR:
Not tested
AI use
🤖 Generated with Claude Code
@MesshM on GitHub · 2026-11-24 06:06 UTC · original
Test run of
0488eceb1f4c6a503b5a1559531aba156dad1202on AMD RDNA4. I merged it onto currentmainbeaa245locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 713 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 672 passed, 0 failed, 21 ignoredSKIPPED; all tests pass with the variable unset (default 1).Review:
XCL_BIG_COMPILESis read once into aOnceLockand 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 ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@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, driver617.42/32.0.16.1742,rustc 1.100.0, DXC Windows SDK10.0.26100.0).0488eceb1f4c6a503b5a1559531aba156dad1202cargo build --workspace): clean (only the pre-existingfetch_updatedeprecation warning).cargo test --workspace -- --test-threads=4):704 passed; 0 failed; 41 ignored(SKIPPED: only the 2 hardwareno wave64tests).XCL_BIG_COMPILESis parsed once viaOnceLock, clamped to1..=16, and defaults to1preserving existing behavior.(Clean-room hardware check only; no retail title or
smoke.ps1run. Assisted-by: Antigravity / Claude Sonnet 5.5 + Gemini 4 Neon)@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:the buffer-mirror bookkeeping in real.rs is green here and the workspace keeps its verdict (737 passed on
mainon 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.
@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 whenXCL_BIG_COMPILESis 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 afteracquire(: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 GBbelow 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=4or 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) needsreserve + WORKINGGiB, whereWORKINGis the number of compiles that passed and are running. Doing the same here (needing3 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.mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@SlopTart on GitHub · 2026-11-24 08:09 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
0488eceonto main1ec4c98, 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_COMPILEStests 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.
@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
0488eceon47efa2ewith 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.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@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 main47efa2ehad 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 andXCL_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=2in 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.
@einfachama on GitHub · 2026-11-24 18:09 UTC · original
Test report for #820 at
0488eceon Windows, merged locally ontomain930e8b4, on my retail title's world load. WithXCL_BIG_COMPILES=3the 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
mainmainnow has25c6f7e, which replacedSlots::acquireandwait_for_commitwithbig_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:acquire, which has no caller left;main'sbig_compile_turnand itswantedpath, with its slot check reading(slots.most)();most: fn() -> usizeandbig_compiles()unchanged;big_compile_testsslots frommost: 1tomost: || 1.main,XCL_BIG_COMPILESsets how many big builds go ahead at once. Builds a bind waits for were never limited by the slot there.mainthe… msofcompute PSO with the translated console CSno longer includes the time spent in the slot queue (25c6f7e), unlike one50836bwhere 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
main930e8b4+ #899f3b7dd6+ 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.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.XCL_BIG_COMPILES=3(the run logsup to 3 big compute pipelines built by the driver at once). Before every run the same cold snapshot of the shader caches was restored:Results
+0x23cf683+0x23cf683(exit0xc0000005, write at address 0) after 28–30 s without a present. No device removal, noE_OUTOFMEMORY.+0x23cf683: 57.7 s and 61.1 s after the load start (the cold one 62.6 s).Not tested
XCL_BIG_COMPILES=3with warm driver blobs (the warm runs above are without #820).mainafter #680 (memory windows from the descriptor heap, merged after these runs, opt-in withXCL_HEAP_WINDOWS=1): with it on, the translated DXIL changes, so the sizes and driver times here are for930e8b4and the switch form.AI use
@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.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.Merge
Merge the changes and update on Forgejo.