Repository navigation
Conversation
An allocator reset can hold sparse state while D3D12 finalises a resource. Queue the retired pins for their owning state and keep a reused interface address separate. Defer emulator-owned sparse block reclamation to a submission or allocation. Assisted-by: OpenAI Codex (GPT-6)
|
Test run of Tested
Review: Taking the buffer's pins out before the release and dropping them outside the sparse-state lock removes the second wait-for-each-other path (allocator reset holding the lock vs. the release callback taking it), the same pattern #443 used for the device replacement. I found nothing to change. Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Test report: with
Hardware: Intel Core i7-7700K, 16 GB RAM, NVIDIA GeForce RTX 5080 16 GB (driver 610.47), Windows 10 22H2 (19045), Agility SDK 620, rustc 1.100.0. AI use: Claude Code with Claude Fable 5.2 read the thread dumps (XCL frames symbolised from the build's PDB) and wrote this; the runs are from the machine named. |
|
The same cycle on AMD (RDNA4), from a retail run that froze at 5 s and stayed frozen for 20 minutes until it was stopped. Two title threads in the thread dump, symbolised with the PDB of a rebuild of the run's tree (
The run had Setup: AMD Radeon RX 9070 XT 16 GB (driver 26.11.2), Ryzen 7 5800X3D, 32 GB, Windows 10 IoT Enterprise LTSC 21H2 (19044), release build. I haven't run #789 itself here. Written with Claude Code (Claude Opus 5.5) from the run's log and thread dump. |
|
Retail DRED startup lock on AMD RDNA4 Tested
Not tested — #789 alone, clean upstream main, or rendered gameplay. AI use — OpenAI Codex ( |
|
Test report: the same result on AMD RDNA4 (RX 9070 XT), with
The merged trees differ from The retail title of #505, release builds,
This covers the two cases @deepdev237's RDNA4 report leaves out: this PR on its own, and clean "Still from" is the last 2 s activity line. No crash or device removal in any run. #789's "could not retire owned block" warning appears in none of the six logs. These runs have no thread dumps, so I can't say where
Hardware: AMD Radeon RX 9070 XT 16 GB (RDNA4, driver 26.11.2), Ryzen 7 5800X3D, 32 GB RAM, Windows 10 IoT Enterprise LTSC 21H2 (19044), rustc 1.100.0 MSVC, DXC 1.9.2609.5. Not tested: this PR's head on its own base ( Written with Claude Code (Claude Opus 5.5): it made the merges and the run script, ran the test suite and wrote this report. The title runs are mine, on the machine named. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
A final D3D12 resource release can run while a command allocator resets with XCL's sparse-state mutex held. If the release callback takes that mutex to unpin the buffer, the reset and the callback can wait for each other. I saw this stack in a local instrumented build. On clean main, a native GPU regression test also blocks when releasing a buffer under that lock. This is a second path into the same mutex after the device-replacement fix in #443.
What is in it
real.rscaptures the buffer's pin registration before the original COM release. On the final release it detaches those pins and queues any emulator-owned sparse allocation for reclamation.sparse.rsdrains released pins on the owning state and reclaims released blocks on a later submission or allocation. The tests cover final release under the sparse lock and reuse of a resource address before the old callback finishes.Tested
cargo build --workspace --frozensucceeded.cargo test --frozen --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 706 passed, 0 failed and 41 ignored in the debug profile. Four tests reported internal skips. Two require native wave64 (gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware), and two require the optional D3D12 debug layer (test_title_draws_with_a_root_signature_under_the_debug_layer,uploads_start_from_each_subresources_state).final_buffer_release_completes_with_sparse_state_lockedtimed out on unmodified main with only the regression test added and passed with the patch.Regression run
Both release builds ran the same title for 60 seconds with upstream
scripts/smoke.ps1. A local launcher started the measured binary inside a zero-network-capability Windows AppContainer and forwarded its native log path and process exit code. The following blocks are the script's output.Main
PR
Not tested
The short runs recorded continued presents through the final sampling intervals. They did not measure time to menus or reproduce the intermittent pre-menu hang. The deterministic release test covers the lock inversion. World loading, long sessions, AMD and Intel GPUs remain unverified for this patch.
AI use
OpenAI Codex (GPT-6) investigated the thread sample, wrote the patch and regression tests, ran the hardware checks and drafted this description at the contributor's direction.