Repository navigation
D3D12.X: forget released command queues from vram::Pages::waited - #1899
emirduran707 wants to merge 1 commit into
Conversation
|
An interaction to watch, from reading the diffs (not run). This PR, #1819 ( On This PR adds AI-assisted (Claude Code). |
…SLATOR_VERSION=10), and xcl-dev#1899 (vram::forget_queue)
|
NVIDIA test report for Tested
Regression run ( base ( this PR: Not tested: the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD. AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it. |
…-dev#1899) `vram::Pages::waited` caches the last tile-mapping fence value each command queue waited on, keyed by the raw `ID3D12CommandQueue` COM pointer. `real::q_release` notified `list_x::on_queue_release` when a queue's refcount reached zero, but left its entry in `vram::Pages::waited`. If a newly created command queue reuses a freed queue's COM pointer while `pages.value` has not advanced, `vram::before_execute` sees the stale entry and skips `queue.Wait(&pages.fence, pages.value)`, allowing the new queue to execute against tiled resources before pending `UpdateTileMappings` complete (and leaking map entries for every destroyed queue). Extract the wait tracker into `FenceWaits`, add `vram::forget_queue`, and call it from `real::q_release` when the queue's refcount reaches zero. Assisted-by: Antigravity (Gemini 4 Neon)
`vram::Pages::waited` caches the last tile-mapping fence value each command queue waited on, keyed by the raw `ID3D12CommandQueue` COM pointer. `real::q_release` notified `list_x::on_queue_release` when a queue's refcount reached zero, but left its entry in `vram::Pages::waited`. If a newly created command queue reuses a freed queue's COM pointer while `pages.value` has not advanced, `vram::before_execute` sees the stale entry and skips `queue.Wait(&pages.fence, pages.value)`, allowing the new queue to execute against tiled resources before pending `UpdateTileMappings` complete (and leaking map entries for every destroyed queue). Extract the wait tracker into `FenceWaits`, add `vram::forget_queue`, and call it from `real::q_release` when the queue's refcount reaches zero. Assisted-by: Antigravity (Gemini 4 Neon)
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
7b493f3 to
9c33650
Compare
XCL PR #1899 verificationClean head Tested
Workspace failures and skips
Not tested Matched AI use T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against |
|
Independent Windows run on 9c33650. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. The clean A scratch test used two real D3D12 queues on the same device. Both completed native waits on the mapping fence. Dropping a nonfinal reference preserved both wait records. Final release removed only the matching record, leaving the other queue’s record intact until its own final release. Omitting only the new cleanup call left the first queue’s stale record and failed the test. The focused filter The fixture covers native release without submission tracking. I also checked the exact #1691 and #1819 heads separately with I combined the three exact heads locally on 568e7db by sending both final-release paths through the same cleanup block. The same workspace build and test commands passed on the integration with 1159 passed, 0 failed, 46 ignored, including 25 runtime skips in Cargo’s pass count. With the D3D12 debug layer enabled, AI use: Codex (GPT-6, exact variant unspecified) prepared the scratch test, ran the checks and drafted this report. |
vram::Pages::waitedcaches the last tile-mapping fence value each command queue waited on, keyed by the rawID3D12CommandQueueCOM pointer.real::q_releasenotifiedlist_x::on_queue_releasewhen a queue's refcount reached zero, but left its entry invram::Pages::waited.If a newly created command queue reuses a freed queue's COM pointer while
pages.valuehas not advanced,vram::before_executesees the stale entry and skipsqueue.Wait(&pages.fence, pages.value), allowing the new queue to execute against tiled resources before pendingUpdateTileMappingscomplete (and leaking a map entry for every destroyed queue).What is in it
crates/xcl/src/hle/d3d12x/vram.rs: extract the wait tracker intoFenceWaits, addvram::forget_queue, and add unit testreleased_queue_address_rewaits_on_reuse.crates/xcl/src/hle/d3d12x/real.rs: callsuper::vram::forget_queue(this as usize)inq_releasewhen the queue's refcount reaches zero.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on 9c33650 (rebased ontomain2aa2d1a): 1136 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodifiedmain2aa2d1aon this GPU (seeds 722 and 1599).cargo test -p xcl --lib released_queue_address_rewaits_on_reuse: 1 passed, 0 failedRegression run
main:
this PR:
Not tested
AI use
main2aa2d1a(a conflict incrates/xcl/src/hle/d3d12x/vram.rs; main's newnote_internal_waitcall kept in the rewritten wait) and reran the suite and smoke runs above.