D3D12.X: a stalled sparse upload retries its unsent chunks and reuses no busy allocator #2821
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!2821
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2821"
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?
@KOLESNiii on GitHub · 2026-11-26 14:29 UTC · original
KOLESNiii:d3d12x-sparse-ring-stall→main· +274 −39 · 1 files · 3 commits · openStacked on #1277; only the top two commits belong here. Part of #1833. This is S1 from the extraction plan in #2787.
#1277 (ExoCalibra) stops
upload_dirtyfrom looping forever, holding the sparseSTATElock, when the staging ring's oldest fence never advances. That loop blockedxcl-activityand every later title submit. This PR ports #2778's two follow-ups (bmjask):upload_dirtyreturns whether everything was submitted. A synchronousreadback_nowstops instead of copying stale GPU bytes over CPU memory when its upload did not go through.begin_slotreturnsNoneinstead of resetting an allocator the GPU may still be using, and checks Reset/Close results. The readback path stops before Reset or before writing to CPU memory when its wait, Close or Reset fails. Failed zero-fills go back toto_zero. The normal path is unchanged.What is in it
D3D12.X: stop sparse upload_dirty ring wait when fence times out: #1277's commit, author kept. For currentmain, I added the twoStatefieldsmainhas since gained (quarantined,queue_fences) to its test's initializer. Without them the test does not compile. #1277 needs the same fix when it is rebased.D3D12.X: stop stalled sparse ring reclaim cleanly(crates/xcl/src/hle/d3d12x/sparse.rs), ported fromfaea307a. The conflicts were resolved by hand: #2778'sstalltracing span and its quarantine-fence helpers are left out. Tests:a_stalled_ring_retries_only_the_unsubmitted_dirty_suffix,a_stalled_upload_ring_returns_and_retries_exact_chunks.D3D12.X: abort sparse allocator reuse after wait failure(same file), ported from37271a3c. It keepsmain's readbackExecuteCommandListscall, not #2778'snative_queue_execute. The stalled-ring test also checks that a slot whose wait timed out is not reset.Tested
cargo test --workspace -- --test-threads=4on475341d1: 1438 passed, 0 failed, 47 ignoredSKIPPEDon this adapter: 24 recompiler GPU tests withno wave64(or the wave32 per-lane form refused), andheap_window_out_of_memory_falls_back_to_the_switch_formwithno heap windowscargo test -p xcl --lib --no-runon the first commit, the full suite on the head)Regression run
main:This PR:
The run never hit a stalled sparse fence, so it does not reach the new failure paths. It checks only that the normal upload path still works.
Not tested
AI use
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.