Repository navigation
D3D12.X: an indirect dispatch does not build a split program's whole form in the call - #2893
Conversation
…form in the call An indirect dispatch of a split compute program runs its whole form, which was built at its first use on the title's thread (Chain::whole, under build_whole). On a retail title's first world frame a render thread stood in bind::execute_indirect -> dispatch_chain::whole behind that lock (thread dumps at 240, 300, 360 and 400 s of a run on an RTX 3060 Ti) while the driver compiled 1.1 MB of DXIL: no present and no submit from 224 s to the end of the run at 420 s. Where compute dispatches go on without a pipeline still being built (XCL_CS_PSO_WAIT_MS), the whole form is now built once by a thread of its own, and until it is there the program's indirect dispatches are left out and counted as skipped, as those of any late compute pipeline. Unset, as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Tested and reviewed commit Tested
Review notes
Not tested
AI use
|
|
Thanks for moving the whole-form build off the render thread. One question, by reading at
As I read it, while that background compile runs, Is that intended? If not, would it be enough to open the AI-assisted (Claude Code, Claude Opus 5.5): read the code at |
Requested by Prime · project thread
An indirect dispatch of a split compute program runs its whole form, which was built at its first use on the title's thread (
Chain::whole, underbuild_whole). WithXCL_CS_PSO_WAIT_MSset, the whole form is now built once by a thread of its own, and until it is there the program's indirect dispatches are left out and counted as skipped, as those of any late compute pipeline. Unset, as before.Part of #2688.
Why
On a retail title's first world frame (RTX 3060 Ti 8 GB) a render thread stood in
bind::execute_indirect->dispatch_chain::wholebehind that lock at every thread dump (240, 300, 360 and 400 s) while the driver compiled 1.1 MB of DXIL: no present and no submit from 224 s to the end of the run at 420 s. With this change the title went on recording world frames in the same run (24,379 dispatches where there had been none after its first world frame).What is in it
crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:Whole(Plain / Ready / Late) andwhole_ready, which spawnsxcl-pso-wholeonce per chain (named like the pipeline workers, so a huge compile takes its turn at their gate) and falls back to building in the call if the thread cannot be made.crates/xcl/src/hle/d3d12x/bind.rs:execute_indirectuseswhole_ready; a late whole form skips the dispatch (counted, a line at powers of two).crates/xcl/src/hle/d3d12x/pso_async.rs:cs_goes_on(whetherXCL_CS_PSO_WAIT_MSis set).Tested
cargo test --locked --workspace --no-fail-fast -- --test-threads=4withXCL_DXC_DIRset to DXC 1.9.2609.5: 1816 passed, 9 failed, 48 ignored. The 9 failures are the same tests that fail onnvidia-deveae01502itself (1816passed,9failed,48ignored there, same command):async_compute_pso_registers_real_pso_and_not_standin,console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,gpu::recomp::tests::gpu_compute_thread_limits_leave_the_lanes_past_them_out,hle::d3d12x::texture_upload::tests::gpu_parts_of_a_texture_go_up_and_the_rest_stays,hle::d3d12x::texture_upload::tests::pieces_hold_the_texels_of_their_levels,split_compute_prefers_the_offline_whole_pipeline,two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs.Build and test (Windows, no GPU)fails here onhle::d3d12x::sparse::tests::a_gpu_write_into_a_gpu_view_lands_in_its_cpu_view(the WARP device is removed, 0x887a0005). That test passes on the card above, on this branch and oneae01502, and fails the same way on the other open pull requests againstnvidia-dev(kernelx: physical page homes in window 0 first, from the top, keeping 64 MB free (#2867) #2905, for one).Regression run
A commit of
main(b49be183, the last one before the shader preparation screen of #2555, which prepares every record before the title and so does not fit a 60 s run):The base of this PR,
nvidia-deveae01502:This PR's head:
Not tested
AI use
Claude Code (Claude Fable 5.2 and Claude Opus 5.5) wrote the code, ran the suite and the regression runs on the hardware above, and wrote this description; Prime asked for it and owns the account. We coordinate the 8 GB work on the XCL Discord too: https://discord.gg/gK3y7WRRY
🤖 Generated with Claude Code