Repository navigation
D3D12.X: a build a submit waits for is wanted from the moment its call is put off - #2579
Open
Royalflamejlh wants to merge 1 commit into
Open
Royalflamejlh wants to merge 1 commit into
Royalflamejlh wants to merge 1 commit into
Conversation
…l is put off need_by_submit marked a put-off call's pipeline by_submit and moved it ahead of the workers' queue, but not wanted, and the big-compile gate reads only wanted: until record_deferred reached the call and marked the next four, those builds went through the gate one at a time, behind the background slot. In a retail title's world start on Linux (RTX 4060 Ti, with xcl-dev#2404 and xcl-dev#2333) the put-off builds spent 3,153 s waiting at the gate against 320 s in the driver. Since ae00ec7 wanted builds have a hard cap of their own (XCL_HUGE_PSO_WANTED_CONCURRENCY), so marking them all at once no longer lets an unbounded number skip the commit headroom; the look-ahead window of four in record_deferred, and want/want_bound behind it, go. Found by reading the gate waits of Bench E's runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Royalflamejlh
marked this pull request as ready for review
November 26, 2026 00:02
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
gustavsi
added a commit
to gustavsi/xcl
that referenced
this pull request
Nov 26, 2026
…ixes Integrates upstream amd-dev 61121fe/xcl-dev#2569 (DirectStorage ordered completion wakeups) plus open PRs xcl-dev#2577 (skip AMD cache-reference driver blobs on disk, xcl-dev#2512), xcl-dev#2578 (clear LAST_CONTENT on placed texture unmap/remap, xcl-dev#2460), xcl-dev#2579 (mark put-off builds wanted immediately), xcl-dev#2556 (NULL-ppv CreateDescriptorHeap test), xcl-dev#2550 (skipped ExecuteIndirect occlusion query), xcl-dev#2549 (reused spare keeps in-flight deferred allocator, with Wine raw fences and UnadoptGuard), and xcl-dev#2548 (Reset/KickoffX/CreateCommandList do not wait on building compute pipelines). Assisted-by: Antigravity (Gemini 4 Neon)
Contributor
|
Test report for Tested
Not tested
AI use
|
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 pipeline that a put-off call needs (#2118) is wanted from the moment the call is put off, not from the moment the submit reaches it.
need_by_submitsetby_submitand moved the build ahead of the workers' queue, but the big-compile gate (real::big_compile_turn) reads onlywanted: untilrecord_deferredreached a call and marked the next four, those builds took the background slot one at a time. Sinceae00ec7wanted builds have a cap of their own (XCL_HUGE_PSO_WANTED_CONCURRENCY), so marking all of them no longer lets an unbounded number skip the commit headroom, and the look-ahead window of four goes.What is in it
pso_async.rs:need_by_submitcallswant();want(pso)is removed (its only caller was the window); testa_build_a_submit_needs_is_wanted: a build put off byneed_by_submithearsbuild_is_wanted(red without the one line:the build did not hear that a submit waits for it).list_x.rs:record_deferredno longer marks the next four (WANTED_AT_ONCEremoved).bind.rs:want_boundremoved.Tested
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175, rustc 1.98.0, release,x86_64-pc-windows-gnu.cargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4: lib 1300 passed, 3 failed, 27 ignored on this head against 1299, 3, 27 onmain08db802; the other binaries 122 passed, 3 failed, 20 ignored on both. The same six fail on both (directed_reference_basics,f64_programs_on_the_gpu,gpu_promoted_uav_clear_values_pass_create_committed_resource,disk_free_space_ex_reports_pls_quota,set_predication_buffer_state_and_kickoff,test_title_runs_and_game_folder_is_untouched). Two lib tests are skipped as they hang under Wine (Tests: the D32S8 target test waits at most 10 s for its list #1706).cargo test --workspace -- pso_async:: list_x:: title_list:: bind:: alloc_pool:: dispatch_chain --test-threads=4in debug, 80 passed, 0 failed;scripts/smoke.ps1: 745 frames against 770 onmain08db802, both exit 0x0, 0 device removals, 0 crashes.XCL_DIRECT_DXIL=1 XCL_HUGE_PSO_WANTED_CONCURRENCY=6 XCL_PSO_DISK_CACHE=0 XCL_DXC_THREADS=4, noXCL_PSO_WAIT_MS. The tree is a local merge ofmaine0d93c8with XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684, D3D12.X: title texture reads outside the coherent window use the safe copy #751, Recompiler: direct DXIL makes a pointer to storage again in each block #2082, Recompiler: direct DXIL gives every loop head and block one back edge #1860, DirectStorage: a queue made with AutoSubmitDisabled waits for Submit #1599, D3D12.X: a draw does not wait for a graphics pipeline still being built #1798, D3D12.X: an ExecuteIndirect of a split program runs its pieces #2404 and D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #2333 (so the splitExecuteIndirects are chained, not built on the title's thread), with and without this change. Each run starts from its own copy of one NVIDIA shader-cache folder (filled by one earlier run). Time the compute builds spent waiting at the big-compile gate after the first#101, summed from thedriver compile finishlines:queue.Waittimeout, no device removal in any.Regression run
Under Wine on Linux (RTX 4060 Ti;
scripts/smoke.ps1unchanged, run by PowerShell 7 withxcl.exestarted through Wine: "peak commit" reads 0 MB there,exit: 0x89is the wrapper ending Wine after XCL's ownprocess ends, andRTX 4060 Ti 8GBis the name vkd3d-proton gives this 16 GB card).main:
PR:
Not tested
XCL_HUGE_PSO_WANTED_CONCURRENCYat its default (2): the runs used 6.nvidia-dev: this does not apply there, asnvidia-dev(c044dc6d) does not have D3D12.X: a dispatch waits for its pipeline at the submit, not in the bind #2118, which this follows.AI use