D3D12.X: compute programs of 4 MB DXIL or more build in their own queue #1278
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!1278
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1278/head"
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?
@bstillbstill on GitHub · 2026-11-24 14:10 UTC · original
bstillbstill:d3d12x/giant-compile-lane→main· +40 −2 · 1 files · 1 commits · closed without mergingA compute program of 4 MB of DXIL or more no longer holds
BIG_COMPILES, the one slot for big background driver compiles. It waits in a queue of its own (also one at a time), so the 0.3 – 1 MB programs a title binds keep being built beside it. Part of #505.The newer retail title (1.0.2.1) has three screen-probe compute programs whose console code is unrolled (88 863 instructions for the biggest): records 22 616 – 22 618 of
shaders.rpf,indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped,…ActivateProbesTarget_534f271f…and…ActivateRays_d60186e6…. Translated they are 29 052, 28 940 and 13 774 KB of DXIL (3 – 6 % less with #680's heap windows; ActivateProbes 22 815 KB without the wave64 split). The NVIDIA driver alone (one thread, no title running) had not built ActivateRays after 14 minutes, at 4.6 GB and growing. A preload starts it 4.4 – 6.5 s into every run of the title here; inBIG_COMPILESit then holds the only slot to the end of the run, and the title's binds of other big programs run out of time behind it.What is in it
D3D12.X: compute programs of 4 MB DXIL or more build in their own queue–crates/xcl/src/hle/d3d12x/real.rs:GIANT_DRIVER_COMPILE(4 MB),GIANT_COMPILES(one at a time),compile_slots(len)picks the queue; testa_giant_driver_compile_does_not_hold_the_big_compile_slot.Tested
NVIDIA GeForce RTX 3090 Ti (driver 32.0.16.2101, 32-lane waves), Intel Core i9-13900K, 32 GB RAM, Windows 11 Pro 10.0.26300, Rust 1.100.0
stable-x86_64-pc-windows-msvc, DXC 1.9.2609.5; debug for the tests, release for the title runs.cargo build --workspace && cargo test --workspace -- --test-threads=4oneb03e7f: 742 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).The new test fails when
compile_slotssends every compile toBIG_COMPILES, and passes with the change.Title runs, newer retail title 1.0.2.1, 300 s each, the same scripted A presses, the two settings in turn, three runs each. Local test build:
main6bac4b4+ #533 + #433 + local diagnostic logging + this change behind a local switch (XCL_GIANT_LANE=0turns it off). In every run the only driver compile of 2 MB or more was ActivateRays, from a preload.The title shows only subtitles over a black screen in its first cutscene in all of these runs (as reported above on #505).
Regression run
main:This PR:
No input in either run (intro and menus). The preload of ActivateRays starts about 4.5 s in, so the new queue is used in both 60 s of this PR's run. Made with
smoke.ps1plus a local fix that reads the log of a run that does not exit by itself (an earlier main run hung inend_titleafter its 60 s); these runs exited by themselves, somain's script gives the same blocks.Not tested
wait_for_commitstill waits for 3 GB before each).XCL_BIG_COMPILES) or #1007 (which changesSlotsandBIG_COMPILEStoo): a conflict inreal.rsis likely.HANDOFF.md(the note on background compute pipelines) says they are built "2 at a time"; onmainit is one, and with this change a giant can build beside that one.AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-24 14:11 UTC · original
Heads-up: conflicts with current
mainincrates/xcl/src/hle/d3d12x/real.rs— needs a rebase before merge.@Prime1997 on GitHub · 2026-11-26 01:02 UTC · original
Closing because main already has this change, from
724b9e27(later refined by051d2c8fandae00ec73).real.rson main definesGIANT_DRIVER_COMPILE(4 MiB), aGIANT_COMPILESslot withmost: 1, andcompile_slots(), which sends 4 MiB-plus pipelines to that lane instead ofBIG_COMPILES. That is the same separate queue for giant compute compiles that this PR adds.Compared at head
eb03e7f3against main08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.Pull request closed