feat(victory-gpu): add opt-in tile reclamation and zero-alloc single-run mappings #429
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!429
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-429"
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?
@Lewandox on GitHub · 2026-11-26 18:19 UTC · original
Lewandox:feat/tiles-opt-in-reclaim-unheld-mips→main· +254 −44 · 1 files · 2 commits · merged 2026-11-26 18:47 UTCSummary
Adds opt-in VRAM tile reclamation for mip levels the title no longer holds (
VICTORY_LEVELS_RECLAIM=1, off by default) and avoids unnecessary per-call heap allocations inTiled::give_lockedandDrop for Tiled(third_party/victory/crates/victory-gpu/src/tiles.rs):VICTORY_LEVELS_RECLAIM=1, off by default):Given(level_runs: Vec<Vec<(usize, u32, u32)>>for standard mips +packed_runs).VICTORY_LEVELS_RECLAIM=1is set and a standard mip level is no longer held by the title or written by the card (!named),give_lockedunmaps that subresource (D3D12_TILE_RANGE_FLAG_NULLviaUpdateTileMappings) and returns its tiles to the heap pool (updatingSTATS[2]), allowing freed VRAM to be reused by other textures (and allowing empty 64 MiB heaps to return to the GPU).give_locked, uses stack arrays for single-run tile mappings (runs.len() == 1, the common case) instead of allocating threeVecs (flags,starts,counts) on everyUpdateTileMappingscall.reclaim_onparsing andreclaim_unheldunmapping/returning tiles for unheld standard mips while preserving held/card-written levels and updatinggiven_bytesaccurately.Verification
cargo test -p victory-gpu --lib tiles::tests(default and--features diagnostics)cargo xtask policyinsidethird_party/victory