GPU: preserve taken dynamic descriptor slots across texture eviction #2705
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2707"
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?
Imported from Marvisak/VIctory. Originally posted by Batushn on 2026-11-25T18:33:28Z.
Fixes #2597
Summary
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T18:54:53Z.
Correct split of the two slot families: title slots evict as before (viewed + forget_read), while dynamic slots are only cleared when not still taken by an in-flight list - and the guard lock is held across the whole scan so a slot cannot be reallocated mid-evict. Nulling the CPU descriptor before taking the kept entry keeps the slot safe against late shader reads. Retiring the old resources after dropping the locks avoids holding next/kept across retire().
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T18:56:59Z.
Independent WARP/CPU verification (claim: Marvisak/VIctory#1633)
fb10ff37a684fb65f5c9076437c6f3ff349c822d/origin/main:13f91caee25f2fdf2c062be5f7a27f058e51cbcagit merge-tree --write-tree origin/main <head>merges cleanly; no prioroni-swrcomment on this head.VICTORY_WARP=1+VICTORY_D3D12_WARP=1(WARP only, no physical GPU, no game files/dumps/retail hashes),dxil.dll1.8.2502.11 (Windows SDK 10.0.26100.0, viaVICTORY_DXIL), rustc 1.98.1 (48a229cea 2026-09-01), debug profile,--locked.Commands / results (baseline =
origin/main, same environment)descriptor::host::tests::evict_keeps_taken_dynamic_slots_until_releasedok; it executes on WARP (creates a texture, compiles with FXC, dispatches a compute shader and reads back 0xCAFEBABE).cargo test -p victory-gpu --locked --features diagnostics: 199 / 0 / 1 (baseline with the feature: 198 / 0 / 1);cargo clippy -p victory-gpu --locked --all-targets --features diagnostics: clean.Negative control: with the eviction restored to the old behaviour (loop over all kept slots incl. dynamic ones, no dynamic pass), the new test FAILS; reverted afterwards.
Code review: No correctness bugs found. Lock order:
nextthenkeptonly in the new pass; no other site nests them the other way, so no deadlock risk seen. Taken dynamic slots keep their view and reference; released ones are nulled and retired. Nits (non-blocking): the test silently returns (passes) when no host device exists, so it only has value where WARP/GPU is available;let _ = index;is a leftover for non-diagnostics builds; the test depends on process-globalhost::release_retired()timing (bounded 5 s wait).Not tested: physical GPU hardware (RX 7800 XT or any), retail game run, release build, other crates.
AI use: Claude Code (Claude Sonnet 5.5) ran the commands and reviewed the diff; the results above are from the actual runs.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T19:32:20Z.
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and code review of
fb10ff37(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo xtask policy: 184 files ok.cargo clippy --locked -p victory-gpu --all-targets -- -D warningsand--features diagnostics: 0 warnings.VICTORY_D3D12_WARP=1):cargo test --locked -p victory-gpu --features diagnostics-> 199 passed, 0 failed, 1 ignored (includingevict_keeps_taken_dynamic_slots_until_released).cargo test --locked -p victory-gpu --lib -- descriptor-> 18 passed, 1 failed (evict_keeps_taken_dynamic_slots_until_releasedpasses on hardware; the sole failure is the pre-existing #1744 1M view-heap cap assertion indynamic_slots_are_held_until_released).Review Notes
HostHeap::evictinto title slots (0..self.count) and dynamic slots (self.count..self.count + self.dynamic) undernext -> keptlock ordering (withcrate::host::retirecalled outside both locks) is deadlock-free, closes the race against concurrentdynamic()allocation, and keeps in-flight dynamic table descriptors backed by a liveID3D12Resource.HostHeap::evictwith #2650 (self.title_ofmapping on the title-slot half, straightforward rebase once either lands).Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:16:09Z.
Automated triage for the maintainers.
Needs rebase. This branch no longer merges cleanly into
main: the conflict is incrates/victory-gpu/src/descriptor/host.rs. No content review was done yet; it will be reviewed once it is rebased onto currentmain.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.