GPU/texture: key THROUGH alias cache by (placed, source) and evict on source release #743
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/fxceless--victory-fork!743
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-743"
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?
@AscilCH on GitHub · 2026-11-25 06:09 UTC · original
AscilCH:fix/gpu-texture-through-alias-cache-key-and-eviction→main· +118 −5 · 1 files · 1 commits · openSummary
Fixes a stale alias copy-footprint cache bug in
crates/victory-gpu/src/texture.rs:THROUGHpreviously mappedplaced as usize -> Arc<Through>, caching both the intermediate UAV copy buffer and thesourcetexture'sD3D12_PLACED_SUBRESOURCE_FOOTPRINTlayouts.sourcetexture was released,forget(source)only calledthrough.remove(&source), leavingTHROUGH[placed]populated. If a differentsourcetexture (with different format, dimensions, or mip count) was later aliased in the same heap memory,alias(list, placed, new_source)hit the stale cache entry, bypassed layout compatibility validation, and recorded invalidCopyTextureRegioncalls using the old source's footprints.THROUGHis now keyed by(placed as usize, source as usize), andforget(resource)evicts all entries referencingresourceas eitherplacedorsource.Verification
cargo test -p victory-gpu --locked -- texture::title_memory_tests: 3 passed, 0 failedVICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --all-features --locked -- texture::title_memory_tests: 3 passed, 0 failedcargo clippy -p victory-gpu --all-targets --all-features --locked: 0 warnings intexture.rs(pre-existing8dd30abwarnings indraw.rs:2377andindirect.rs:1322untouched)cargo xtask policy:171 files ok(AI-assisted; synthetic unit tests only, no game data.)
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.