Texture pool: sweep empty 64 MiB blocks on budget tick without residency #327
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/327"
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 avatarmanz/VIctory-7900XTX. Originally posted by finegorko on 2026-11-26T17:06:08Z.
When
VICTORY_RESIDENCYis off,pool::room()updatesSPARESfromSPARE_KEPT(64) toSPARE(2) at 85% VRAM, but previously never sweptTEXTURES. If texture admission pauses (Pool::take()->rested()stops running) or empty blocks are already sitting idle, up toSPARE_KEPT(4 GiB) of empty 64 MiB heaps remain held until a future allocation.Change
crates/victory-gpu/src/pool.rs:residency::on()branch inpool::room(): whenlimit < SPARE_KEPT,try_lock()TEXTURESand callpool.reclaim(now(), limit, true).VICTORY_POOL_RECLAIM(default on;0disables; A/B testable viacrate::ab::pick).sweep_reclaims_empty_spares_without_new_allocations.Measured (Windows 11, RX 7900 GRE 16 GB, Xbox Series S diag run)
11,973->12,482 MB / 14,488 MBbudget),texture poolshrunk from6,592 MBdown to6,016 MB(-576 MB, 9 empty 64 MiB heaps released back to D3D12/DXGI) without extra texture eviction churn.resource::let_go_idle()untouched; fragmented pools holding live textures cannot free partial 64 MiB heaps via idle eviction alone, and subtracting onlyempty_blocksthere caused heavy thrashing in prior testing. Complementary to #297.Validation
cargo test -p xtask --locked: 9 passedcargo test -p victory-gpu pool::tests --locked: 9 passedcargo xtask policy: 265 files okcargo build --locked --profile diag -p victory --features diagnostics: okView 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.