Repository navigation
D3D12.X: a build a submit will wait for is wanted from the put-off call on - #2832
NWProgramming00 wants to merge 1 commit into
Conversation
…ll on A call put off to the submit (`need_by_submit`) moved its build before the workers' queue, but the build stayed unwanted until the submit itself waited for it. A huge unwanted build waits for commit headroom in `big_compile_turn`, and while a title loads its world on a machine with little free commit that headroom does not come: put-off builds then went through the gate one at a time, each only once its submit waited for it. The build is now wanted from the put-off call on, so it takes a slot of the wanted cap (`XCL_HUGE_PSO_WANTED_CONCURRENCY`, default 2) without the commit wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@NWProgramming00 heads-up before reviewers find it: #2579 (@Royalflamejlh, open) makes the same one-line change, AI use: Claude Code (Claude Opus 5.5) compared the two diffs and wrote this. |
|
Independent Windows/NVIDIA check of current #2832 head
I checked the overlap already raised with #2579: both add Not tested: a cold world-load timing comparison, retail smoke, AMD/Intel, or Linux/Wine. The focused result verifies demand propagation, not faster first-frame time. AI use: Codex (GPT-6.2 Sol) reviewed the diff and overlap, ran the tests and local control, checked the baseline failure, and drafted this report. |
Part of #2088. It also bears on the world-start stalls in #505, a step on the #1833 roadmap.
A call put off to the submit (
need_by_submit, from #2118's dispatches and #2611's graphicsExecuteIndirects) moves its pipeline's build before the workers' queue, but the build stays unwanted until the submit itself waits for it. A huge unwanted build waits inbig_compile_turnfor both the unwanted slot and 3 GB of commit headroom. While a title loads its world on a machine with little free commit, that headroom does not come. Put-off builds then go through the gate one at a time, each only once its submit waits for it, while the other workers sit in the gate.This makes the build wanted from the put-off call on. A submit is going to wait for it anyway. A huge one then takes a slot of the wanted cap (
XCL_HUGE_PSO_WANTED_CONCURRENCY, default 2) without the commit wait, as the build a submit already waits for does today. The cap still bounds how many huge builds the driver runs at once.@KDenKC suggested this go in its own PR (#2611 (comment) and the reply below it).
What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:need_by_submitcallswant()the first time a pipeline is needed by a submit. The rest is unchanged: theNEEDEDqueue, the wanted cap, and the commit wait for builds nothing needs yet (preloads and plain background builds).a_pipeline_a_submit_needs_is_wanted_before_the_submit_waits: a worker's build seesbuild_is_wanted()turn true afterneed_by_submit, with nobody waiting. It fails onb49be18: the build never became wanted.Tested
XCL_ADAPTER=radeon), AMD Ryzen 7 9700X, 31 GB RAM (commit limit 41.7 GB), Rust 1.100 MSVC, release.b49be18("a call put off to the submit did not make its build wanted") and passes with the change. All 15pso_asynctests and the 11big_compilegate tests pass.cargo build --release --workspace, thencargo test --release --workspace --no-fail-fast -- --test-threads=4, with and withoutXCL_DIRECT_DXIL=all, against baseb49be18on the same machine:b49be18e2ecdfa)XCL_DIRECT_DXIL=allXCL_DIRECT_DXIL=allThe +1 is the new test. The failing tests are the same on base and PR in every row:
fuzz_validate_and_gpu_0..3on NVIDIA (#1905) andfuzz_validate_and_gpu_1on the Radeon (#2115).SKIPPEDlines: 46 on NVIDIA, 28 on the Radeon, the same on base and PR.XCL_NETWORK=0 XCL_ACTIVITY=1, RTX 5070 Ti). These were made with the same change behind a local switch, onb49be18+ D3D12.X: a graphics ExecuteIndirect waits for its pipeline at the submit, not in the call #2611 + Shaders: warm runtime-selected graphics DXIL variants in --precompile #2613, from the same cache copy. Details: D3D12.X: a graphics ExecuteIndirect waits for its pipeline at the submit, not in the call #2611 (comment)big_compile_turnand the title's submit inrecord_deferred → resolve_wait.D3D12 device removed: 0x887a0005, with no DRED or shader-code count. I cannot tell whether that is NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403's shader-code heap, reached sooner because pipelines are made faster, so I do not claim either way.mainalone the change reaches D3D12.X: a dispatch waits for its pipeline at the submit, not in the bind #2118's put-off dispatches. I have no run that isolates their gate waits.Regression run
Base (
main), NVIDIA GeForce RTX 5070 Ti:This PR, same card:
These 60 s runs end in the title's menus, before the world load where put-off builds pile up, so they check that nothing else changed.
Not tested
AI use
🤖 Generated with Claude Code