Repository navigation
D3D12.X: name XCL's own tile-mapping lists and say when a wait for a queue gives up - #873
Conversation
…queue gives up Diagnostics for a queue that stands still. With the debug layer on, a retail title's device was removed with "The command allocator was reset after the command list was recorded" (id 541) on an 'Unnamed ID3D12GraphicsCommandList Object': the title's list or one of XCL's could not be told apart. XCL's tile-mapping queue, its upload lists and its readback list now carry names. Two waits end after a time limit and carry on without a word: the tile-mapping queue's wait for its own fence (5 s), and the wait of the writes after the GPU for their queue (10 s; the title then reads a progress value its queue has not reached). Both now log a warning. Assisted-by: Claude Code (Claude Fable 5.2)
|
Data on the same id 541 from a second machine, in case it saves you a step: here it is not one of XCL's lists either, and the submit comes from the D3D12 runtime's own thread, after a CPU cycle break. Setup
What the runs show
Not tested
AI use
|
|
Follow-up with this PR (dbe9324) in the tree from my comment above, plus #866,
So the only early "done" left in these runs is the #795 cycle break signalling the fences on the CPU: the waiters' queues go on, and lists the runtime was still holding behind a Not tested
AI use
|
Keep the legacy fallback warning from xcl-dev#873 and hold deferred 64-bit progress until its producer fence completes. Focused cpu_writes suite: 3 passed on RX 9070 / GE-Proton with both paths exercised. Assisted-by: omp (GPT-6.2 Sol)
|
A correction to my two comments above: the CPU cycle break is not the only way to this removal here. Same machine and title, tree from above plus #851 (4bf6d60):
So across five debug-layer runs every 541 came within ~100 ms of a CPU cycle break, but one run without the debug layer reset with neither a cycle break nor a watchdog release, so "the cycle break causes it" in my earlier comment was too strong. What the runs do share is runtime-held submits (a Not tested
AI use
|
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean Same count as main (the change is naming plus the wait message), so the existing tests exercise it and nothing regresses. Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
… split xcl-dev#708 predates xcl-dev#795 (GPU-fence bridge) and xcl-dev#797 (mid-list split) and was not rebased. Resolution keeps main's split machinery (xcl-dev#797 + xcl-dev#851) and cpu_writes from xcl-dev#850 (the xcl-dev#708 per-queue workers with xcl-dev#873's diagnostics), and ports xcl-dev#708's core change onto it: - wait_gate.rs (from xcl-dev#708): a queue-side gate the CPU opens once it sees the progress value. - PendingWait::gate: a Wait64 GE, full mask, on a non-sparse value the CPU can read, in a direct/compute title list, that starts its PC segment (split by xcl-dev#797/xcl-dev#851, or nothing recorded before it). - execute_with_waits_on / KickoffX: gated waits arm a wait_gate instead of the xcl-dev#795 GPU-fence bridge; with sparse writes at or after the list in the batch they take the bounded CPU wait (xcl-dev#708's rule). Other waits keep the xcl-dev#795 bridge. Arming failure stops the title (xcl-dev#708). - Dropped from xcl-dev#708: its own title_list piece/split machinery, split_recording, restore_after_reopen, open-query / split-barrier tracking and the Result-returning execute_with_waits. - wait_tests.rs (from xcl-dev#708) adapted to push_segments / execute_with_waits_on.
Diagnostics for a queue that stands still; no behaviour change. With the debug layer on, a retail title's device was removed with "The command allocator was reset after the command list was recorded" (id 541) on an
Unnamed ID3D12GraphicsCommandList Object, and nothing in the log said whose list it was, or that a wait had given up just before.What is in it
crates/xcl/src/hle/d3d12x/sparse.rs: XCL's tile-mapping queue, its upload lists and allocators and its readback list and allocator get names (SetName), so a debug-layer message about one of them says so; a list that stays "Unnamed" is the title's.sparse.rswait_for: a warning when the tile-mapping queue has not reached the fence value after its 5 s limit (it carried on silently, and the caller then resets the allocator).crates/xcl/src/hle/d3d12x/cpu_writes.rs: a warning (the 1st, 2nd, 4th, … time) when the writes after the GPU are done although their queue had not got there afterWAIT_MS(10 s): the title then reads a progress value its queue has not reached.No test: names and log lines only.
Tested
cargo build --workspace, thencargo test --workspace -- --test-threads=4: 715 passed, 0 failed, 41 ignored; no SKIPPED tests on this adapterXCL_D3D12_DEBUG=1, on a build of main at beaa245 plus these lines: the two debug-layer reports about a command list (id 553) named an "Unnamed" list, so not one of the named ones here.Regression run
main (e7da8a1 is the commit of #866, merged as a1672ef):
PR:
Not tested
AI use
🤖 Generated with Claude Code