D3D12.X: name XCL's own tile-mapping lists and say when a wait for a queue gives up #873
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!873
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/873/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@theaustinayers on GitHub · 2026-11-24 07:09 UTC · original
theaustinayers:queue-wait-diagnostics→main· +15 −0 · 2 files · 1 commits · merged 2026-11-24 07:12 UTCDiagnostics 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 atbeaa245plus 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 (
e7da8a1is the commit of #866, merged asa1672ef):PR:
Not tested
AI use
🤖 Generated with Claude Code
@woreksami on GitHub · 2026-11-24 07:13 UTC · original
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
mainbeaa245(so #795 + #797 in) + #214, #267, #456, #468, #503, #533, #572, #640, #825, #850, plus local changes: draws of a frame share oneXCL_PSO_WAIT_MSbudget, empty texture-page pools released, and a mid-list split takes a new PC list instead of a spare.XCL_D3D12_DEBUG=1on the runs below unless said.What the runs show
100.567 id 541 … ExecuteCommandList: The command allocator was reset after the command list was recorded→100.577 device removed 0x887a0001. So it is a submit the runtime held back behind aqueue.Waitand released later, not a call XCL or the title made at that moment.GPU queue.Wait at 0x70416ac60 >= 0xbd4 did not complete within 5000 ms (…) – releasedat 136.2 s.fence has not advanced past previous executions) shows up once per run on an unnamed list, e.g. at 62.2 s, before any mid-list split had happened, so not #797's segments; it looks likeKickoffXresetting a list right after its submit and submitting it again while the first is in flight.6c98f92+ the same PRs) did not get the 541, but the GPU hung at 53.4 s (0x887a0006, in a title-texture copy). That matches what #866 describes; I have not yet run it with #866.Not tested
AI use
@woreksami on GitHub · 2026-11-24 07:18 UTC · original
Follow-up with this PR (
dbe9324) in the tree from my comment above, plus #866,XCL_D3D12_DEBUG=1, same machine and title.ID3D12CommandQueue::ExecuteCommandList: The command allocator was reset after the command list was recorded.), so the names here cannot tell whose it is from that message. The names do show up elsewhere: 8 of the id 1047 messages namexcl sparse queue.… writes after the GPU so far … had not got there after 10000 ms) did not fire in the run, and neither did the sparse-queue wait warning. So XCL did not publish a progress value early throughcpu_writeshere.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
queue.Waitreach the GPU after the title has reset their allocator.Not tested
AI use
@woreksami on GitHub · 2026-11-24 07:32 UTC · original
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):would close a GPU cycle – signalled on CPUline and nodid not complete within 5000 ms – releasedline in the whole run. Just before it there were splits (#5–#11 in 86.26–86.75 s) andWait64BitValueX … bridged to GPU queue.Wait (…; wait-before-signal)lines, four of them withprod=qNonebetween 85.0 and 87.4 s. TheCreateCommandList … → 0x887a0005lines that follow are after the removal, not its cause. Without the debug layer I can't say which call it was.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
queue.Waitbefore its signal) going out from the sync thread after the title has recycled the allocator; the cycle break is one way such a wait ends early.Not tested
XCL_DRED's comment says for another title), AMD.AI use
@dcastell1 on GitHub · 2026-11-24 07:51 UTC · original
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
main@beaa245(713 passed, 0 failed, 41 ignored on this box):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.