Repository navigation
Conversation
PC D3D12 does not allow submitting a command list whose previous execution the GPU has not finished (debug layer id 553: "the command queue fence has not advanced past previous executions of the command list"); a console lets a title do it. With the debug layer on, the retail title's world load shows id 553 from 85.8 s, then cross-queue waits that stop one signal short, then the device removal (xcl-dev#1452). alloc_pool::executed signalled a per-queue fence after submits of the lists it tracks (title lists). It now does so after every submit, so the PC lists behind console lists are covered too, and remembers each list's last submit (queue, fence value, recording number). note_resubmits, called before each ExecuteCommandLists chunk, logs a list whose previous submit is still running: whether it is the same recording and the same queue (the first 8, then at powers of two). The only change besides the log is that extra fence signal on submits of untracked lists. Part of xcl-dev#1452. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A console lets a title Reset a command list and submit the new recording on the same queue while the GPU still runs the previous one. The PC does not let a list be submitted again before its last execution is done (debug layer id 553, "the command queue fence has not advanced past previous executions of the command list"); on NVIDIA the device is removed about 12 s later. The retail title's world load does it (xcl-dev#1452): note_resubmits logs "a new recording, the same queue", 8 lists at once. A title's list is a title_list wrapper whose PC lists already change (mid-list split segments, a spare pool per list), so the fix uses that: at the title's Reset, when alloc_pool says the primary PC list's last submit has not completed, the new recording goes onto a spare whose submits are done (or a new PC list), reset like the primary would be (reset_pc), and push_segments submits it in the primary's place (SegmentBook::first). The next Reset after the GPU is done records on the primary again and the stand-in goes back to the spares. pop_spare now skips spares still on the GPU, so split segments do not hit the same error. No CPU wait. When the primary is not in flight nothing changes. The retail title does not Reset through the wrapper's xcl-dev#10: its runtime has the newer console list layout, whose Reset is xcl-dev#139 (allocator, NULL, 0). The wrapper's xcl-dev#139 is a thunk to the active PC list (F_BACKING), and there NEWER_LIST_SLOTS's layout split runs the xcl-dev#10 handler, reset_x, on that PC list. So the wrapper's Reset, and its in-flight check, never ran (measured: the stand-in 0 times, 64+ resubmits, each list last reset in reset_x and still the wrapper's active PC list). reset_x now hands a Reset of a PC list a wrapper records on to the wrapper's Reset; the PC list's own Reset is reset_pc, which the wrapper and the stand-in call. This also resets a split list from its primary on xcl-dev#139, not from its last segment. Test: a list reset and submitted three times while a queue Wait holds the first submit records on three different PC lists and note_resubmits sees none, then on the primary again once the GPU is done; once with the wrapper's xcl-dev#10 and once with reset_x on the active PC list, as xcl-dev#139 does. Without the stand-in the second submit is the primary and the test fails; without the hand-over in reset_x the xcl-dev#139 round fails the same way. Part of xcl-dev#1452. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows x64 + Intel Arc A770 test report on commit Environment
Command xcl-97fdf2b9ff8e1482.exe --exact --nocapture --test-threads=1 `
hle::d3d12x::alloc_pool::tests::a_resubmit_while_the_previous_submit_runs_is_noticed `
hle::d3d12x::alloc_pool::tests::a_spare_whose_reset_fails_stays_available_for_retry `
hle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list `
hle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_sparesResults
Not tested
AI use
|
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Focused Windows check on exact PR head Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M, driver Tested: Built the XCL lib-test executable with Result: 1 passed, 0 failed, 0 ignored, 0 Scope: Focused test only. I did not run the full workspace suite, reproduce the title's real #139 layout path, or run a paired title smoke test on this PR head. AI use: OpenAI Codex built and ran the test, checked the GPU-selection method and exact revision, and prepared this report. |
|
Linux (Wine + vkd3d-proton) + NVIDIA test of Setup: Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, RTX 4070 12 GB (driver 615.71.09). Both trees on Tested
Not tested: the test suite; past 100 s; the debug layer (not under vkd3d-proton); Windows; AMD and Intel. AI use: Claude Code (Claude Opus 5.5) read the change, built the trees, ran the title and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
Stacked on #2160; only the top commit (
78fba7b) belongs here.The retail title resets a command list and submits its new recording on the same queue while the GPU still runs the list's previous submit. A console allows that; PC D3D12 does not (debug layer id 553), and on NVIDIA the device is removed soon after (#1452). With this change such a recording goes onto a spare PC list instead, the way
alloc_poolalready swaps allocators, so no PC list is submitted again while it runs. No CPU wait.The title resets through the newer console list layout's #139 (allocator, NULL, 0). The title list's wrapper forwards that slot to the PC list it records on, where it reaches
list_x::reset_x, bypassing the wrapper's own #10 Reset. Soreset_xnow sends a reset of a wrapped list's PC list to the wrapper's Reset, which decides between the primary PC list and a stand-in.Part of #1452. It does not fix the device removal on its own, see below.
What is in it
crates/xcl/src/hle/d3d12x/title_list.rs:SegmentBook::first, a PC list recording in place of the primary while the primary's last submit runs. Reset puts the new recording on it,push_segmentssubmits it in the primary's place, and the next Reset after the GPU is done returns to the primary.pop_spareskips spares still on the GPU,put_spareis new, andreleasefreesfirst.crates/xcl/src/hle/d3d12x/list_x.rs:reset_stand_in(a finished spare or a new PC list, reset like the primary).reset_xroutes a wrapped list's reset through the wrapper; the old body isreset_pc. Side effect: a DXC memory gate: reserve only the running compiles' growth, no stampede after a minute #139 Reset on a split list now resets from the primary and reclaims the extra segments, where before it reset only the last segment.crates/xcl/src/hle/d3d12x/alloc_pool.rs:in_flight(list).a_reset_while_the_last_submit_runs_records_on_another_pc_list, through Olympus: harden GameSave read results #10 and throughreset_xon the PC list, as DXC memory gate: reserve only the running compiles' growth, no stampede after a minute #139 resolves. A queue Wait holds the first submit; three Reset and submit rounds must use three different PC lists with no resubmit, then the primary again once the GPU is done. Without the change it fails ("the new recording must not be on the PC list still on the GPU").Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4on78fba7b(on D3D12.X: log a command list submitted while its previous submit runs #2160,main6020a33): 1 156 passed, 0 failed, 46 ignored, first run (one more than D3D12.X: log a command list submitted while its previous submit runs #2160: this PR's test). Same 25SKIPPEDlines as D3D12.X: log a command list submitted while its previous submit runs #2160 (wave64, per-lane refusals, heap windows, driver cache).XCL_DIRECT_DXIL=1, this commit and D3D12.X: log a command list submitted while its previous submit runs #2160 on top ofmain177cd40(where the removal reproduces here in 4 of 4 runs at 92 – 100 s), two 5-minute runs:So the resubmits are gone. The removal still happened in 1 of 2 runs, later, again a few seconds after cross-queue waits started timing out one signal short (#1452). That part is not this.
Regression run
scripts/smoke.ps1, the retail title, 60 s, release builds of both commits,mainfirst.main:
PR:
Not tested
reset_xon the PC list directly, which is what DXC memory gate: reserve only the running compiles' growth, no stampede after a minute #139 resolves to.AI use
🤖 Generated with Claude Code