Repository navigation
D3D12.X: a buffer released during a placement keeps the new one (#2457) - #2528
xpatfussy69x wants to merge 1 commit into
Conversation
…dev#2457) place_buffer holds the sparse STATE across CreateReservedResource. A placed buffer whose last Release runs meanwhile cannot take STATE, so forget_buffer queues it in FORGOTTEN for the next lock_state. If the new reserved resource gets the released one's address, place_buffer recorded the new buffer under it and the next lock_state let it go: its tiles were unpinned while the buffer was live on the GPU. The new buffer is now recorded by record_buffer, which lets the queued buffers go first. This is item 2 of xcl-dev#2457; item 1 (the fence quarantine on unpin) is claimed on the issue and not in this change. Test: the old buffer at an address is queued as released, a new one is recorded there, then lock_state's drain runs. Without the fix the new buffer's entry is gone; with it the entry and its pin stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
Heads-up for merge order: #2531 renames AI use: Claude Code (Claude Opus 5.5) found this by building the merge. |
|
Two contributors checked independently and found that #2539 solves the same problem (for #2457) in a different way: #1607, group D122. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
|
Thanks for the hint. #2539 and this PR fix the same item (2) of #2457 the two ways the issue suggests; this one was opened first (21:45 vs 22:12 UTC).
If not holding the lock across the driver call is wanted for its own sake, #2539 is the more complete fix and I'm happy to close this one in its favour; if the minimal fix is preferred, this one. I'll leave the choice to the maintainer and won't push either way. AI use: Claude Code (Claude Opus 5.5) compared the two diffs; I checked the comparison. |
|
NVIDIA test report for
Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5). |
…#2528 + xcl-dev#2539) (cherry picked from commit 95bc8198b89ff2c73a556cb370ab5055bbf821ec)
Part of #2457 (item 2 only; item 1 is claimed on the issue).
place_bufferholds the sparseSTATEacrossCreateReservedResource. A placed buffer whose lastReleaseruns meanwhile cannot takeSTATE, soforget_bufferqueues it inFORGOTTENfor the nextlock_state. When the new reserved resource gets the released one's address,place_bufferrecorded the new buffer under it, and the nextlock_statelet it go: its tiles were unpinned while the buffer was live on the GPU. The new buffer is now recorded byrecord_buffer, which lets the queued buffers go first (the issue's second fix direction).What is in it
crates/xcl/src/hle/d3d12x/sparse.rs:record_buffer(pins the new buffer's tiles and records it, afterforget_released);place_bufferuses itcrates/xcl/src/hle/d3d12x/sparse.rs:a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it: an old buffer at an address is queued as released, a new one is recorded there, thenlock_state's drain runs. Fails without the fix (the new buffer's entry is gone), passes with it.test_state()builds aStateover a D3D12 device (WARP without a GPU) asa_pool_retired_a_moment_ago_is_taken_backdoesTested
cargo test --workspace -- --test-threads=4: 1424 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo; Recompiler: the per-lane form takes f16 converts and products from #1426 #2182 removes them)cargo test -p xcl --lib d3d12x::sparse: 18 passed, 0 failed, 1 ignoredRegression run
main:
PR:
Not tested
AI use