Repository navigation
D3D12.X: compute programs of 4 MB DXIL or more build in their own queue - #1278
Draft
bstillbstill wants to merge 1 commit into
Draft
bstillbstill wants to merge 1 commit into
bstillbstill wants to merge 1 commit into
Conversation
A retail title binds three screen-probe compute programs whose console code is unrolled (88 863 instructions for the biggest); translated they are 13 - 29 MB of DXIL. The NVIDIA driver alone had not built the smallest of them (13 774 KB) after 14 minutes on an RTX 3090 Ti. A preload starts it about 4.5 s into a run and, as a big compile, it holds BIG_COMPILES (one slot) to the end of the run: in three runs no other compute pipeline of 256 KB or more was built after 67 s, and the title's binds of 0.3 - 1 MB programs ran out of time behind it. Programs from GIANT_DRIVER_COMPILE (4 MB) on now wait in GIANT_COMPILES, one at a time, beside BIG_COMPILES. In three runs of a local test build with the same change, big compiles finished after 60 s in two (892 KB at 99 s, 1 001 KB at 146 s), against none in three runs without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Heads-up: conflicts with current |
gustavsi
added a commit
to gustavsi/xcl
that referenced
this pull request
Nov 24, 2026
…all#1248, ivall#1250, ivall#1265, ivall#1273, ivall#1277, ivall#1278 Fix sudden RAM OOM during world loading under XCL_PSO_WAIT_MS and integrate 6 new upstream PRs: - pso_async.rs: track active waiters via WantGuard so build_is_wanted() drops back to false once resolve_within times out, preventing all background workers from bypassing BIG_COMPILES and commit-memory guards simultaneously (adds unit test a_timed_out_bind_clears_wanted_demand). - ivall#1248: pack <= 4 KiB sampled textures into 4 KiB heap slots instead of 64 KiB tiles (~768 MiB VRAM saved). - ivall#1250: late_release seals/waits only when nothing is in flight. - ivall#1265: default SRVs of multisampled depth buffers use Texture2DMS/Texture2DMSArray. - ivall#1273: skip budgeted bind waits when all workers are busy / build is queued behind others. - ivall#1277: exit sparse::upload_dirty cleanly if staging ring fence wait times out. - ivall#1278: isolate >= 4 MiB DXIL compute driver compiles in a dedicated GIANT_COMPILES queue. Assisted-by: Antigravity (Google DeepMind)
This was referenced Nov 24, 2026
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A 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+ D3D12.X: bound compute pipeline waits so slow compiles do not trip wa… #533 + D3D12.X: sparse readbacks don't wait for a queue held by a later signal #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 Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #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 D3D12.X: boost low-priority preload PSO workers on demand and priorit… #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