d3d12: split memory_wait lists safely, elide satisfied waits, and track cross-submit writes #186
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/brcly--TuxBox!186
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/186/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?
@Vladimir-Human on GitHub · 2026-11-25 18:09 UTC · original
Vladimir-Human:d3d12/fix-memory-wait-stalls→main· +3415 −676 · 26 files · 1 commits · merged 2026-11-25 19:03 UTCAI-assisted PR. Rebased onto
main(4cb6a4a, preserving PR#183dispatch-waitand split COM/allocator lifetime improvements).Summary
Eliminates repeated CPU/GPU synchronization stalls and allocator overhead in
runtime/d3d12memory_waithandling (runtime/d3d12/src/only):memory_waitsegments cleanly across COPY, COMPUTE, and DIRECT queues with full bound-state replay (OMSetRenderTargetsCPU snapshot,OMSetBlendFactor(NULL)->[1.0; 4]per Direct3D spec), retaining prefix guest allocator and split tail COM references across submission and markingnative_open = falseunconditionally before propagatingClose()errors.Comparisonpredicate ops (1..=8) and safely elides pre-satisfied waits via bounded in-flight cross-submission write tracking (queue_trace::note/retire_fenceprogress +IN_FLIGHT_WRITES), blocking unsafe elision across both same-queue and cross-queue submissions while delivering 0-fence elision on read-only/retired waits.PendingWaits/Job::Dropleak guards forplacement::held::Waits.<= 1,200lines with zero inline#[cfg(test)]modules.Verification (commit
6bae7109, RTX 4070 SUPER10de:2783)python -m unittest tests.test_repository_hygiene -v: 4/4 PASS (max.rsfile1,166lines<= 1,200)cargo test --manifest-path runtime/d3d12/Cargo.toml: 125 passed, 0 failedpython build.py d3d12+python build.py lanes: PASSbuild/lanes/lanes.exe --selftest dispatch-wait --adapter 10de:2783: PASS (wait=list-start&wait=after-dispatch)build/lanes/lanes.exe --selftest all --adapter 10de:2783: 13/13 PASSqueues,draw,tables,indirect,copy-resource,buffer-import) + D3D12 Debug Layer probes (F1–F3, in-flight Reset/Release, Fresh split, open query): ALL PASS, 0 unexpected errors7b22d71) vs AFTER (fca35761, rebased6bae7109): 1,000 pre-satisfied waits44.54 ms (1,000 fences)->1.71 ms (0 fences, 1,000 elided)(26.0x faster); delayed cross-queue wakeup1,696.4 -> 291.4 µs(5.82x);lanes --benchmarkPASS.git merge-tree --write-treeclean vsorigin/main(4cb6a4a) and PR#185.