GPU: preserve taken dynamic descriptor slots across texture eviction #2707
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2707
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Batushn on GitHub · 2026-11-25 18:33 UTC · original
Batushn:fix/evict-preserve-taken-dynamic-slots→main· +268 −6 · 1 files · 1 commits · openFixes #2597
Summary
@kotekompotek on GitHub · 2026-11-25 18:54 UTC · original
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().
@oni-swr on GitHub · 2026-11-25 18:56 UTC · original
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.
@fuzeofficlal on GitHub · 2026-11-25 19:32 UTC · original
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).@Marvisak on GitHub · 2026-11-25 22:16 UTC · original
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
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.