Repository navigation
D3D12.X: a freed descriptor range at the cursor serves requests into the tail - #1970
Conversation
…the tail take_range checked the freed list and the never-used tail separately: a freed range ending exactly at the cursor is contiguous with the tail, but a request larger than the range was refused as full even though the run was there (the false-exhaustion shape a public sibling project reported for the same design, Marvisak/VIctory#871 - facts only, no code taken). take_range now takes such a range whole and bumps the cursor over into the tail; release_global merges adjacent released ranges so first-fit sees whole runs. Found while writing the descriptor-allocator contract tests for xcl-dev#1269. Co-Authored-By: Claude Code <noreply@anthropic.com>
527e7dd to
646b439
Compare
…the tail (xcl-dev#1970) take_range checked the freed list and the never-used tail separately: a freed range ending exactly at the cursor is contiguous with the tail, but a request larger than the range was refused as full even though the run was there (the false-exhaustion shape a public sibling project reported for the same design, Marvisak/VIctory#871 - facts only, no code taken). take_range now takes such a range whole and bumps the cursor over into the tail; release_global merges adjacent released ranges so first-fit sees whole runs. Found while writing the descriptor-allocator contract tests for xcl-dev#1269. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Code review on
What is still needed before merge: Independent AMD and NVIDIA verification (currently author RTX 4090 only). |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
PR #1970 verification on STOR-WINLABPR head What is in it
Tested
Failures
Explicit skips Not tested
AI use T3 Code / Codex ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
The shared console descriptor heap reported itself full while a contiguous run was free: a freed range ending exactly at the allocation cursor is contiguous with the never-used tail, but
take_rangechecked the freed list and the tail separately and refused requests larger than the freed range — the false-exhaustion shape a public sibling project reported for the same allocator design (Marvisak/VIctory#871; facts only, no code ported). Part of the D3D12.X contract line claimed on #1269.What is in it
crates/xcl/src/hle/d3d12x/console_heap.rs:take_rangetakes a freed range that ends at the cursor whole and bumps the cursor over into the tail;release_globalmerges touching released ranges (merge_release) so first-fit sees whole runs; two unit tests (cursor straddle, release merge)Tested
cargo build --workspace+cargo test --workspace -- --test-threads=4on527e7dd: 988 passed, 0 failed, 45 ignored; 22 SKIPPED, all adapter limits of this wave32 card (the wave64 lowering/comparison GPU tests andheap_window_out_of_memory_falls_back_to_the_switch_form); head646b439is the same code with a shorter comment header, and it builds release cleanSome(8)for exactly the input the old code returnedNonefor (freed 4 at the cursor, 4 of tail, request 8) — it pins the fixed shapeRegression run
main
62265d3:head
646b439(no uncommitted changes):Not tested
AI use
🤖 Generated with Claude Code