pool.rs: scale spares() by remaining DXGI VRAM headroom instead of fixed 4 GiB #94
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#94
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Matt1x-T1x on GitHub · 2026-11-26 03:15 UTC · original
Ref: #76 (comment by @endangeredd and 8 GB test by @lorenzopincinato), #65
Problem
On 8 GB and 16 GB GPUs, the texture pool can reserve up to 4 GiB of empty blocks (
SPARE_KEPT = 64× 64 MiB), pushing VRAM over the DXGI budget (causing PCIe paging / ~1 fps on 16 GB cards as measured in #76, and costing ~1–1.5 GB VRAM on 8 GB cards).The overshoot comes from
spares()incrates/victory-gpu/src/pool.rs(lines 48–53):Because this check is binary, any GPU below 85% usage immediately allows keeping up to 64 empty blocks (4 GiB), regardless of how much headroom is actually left before reaching 85%.
Suggested fix
Pool::rested()already trims excess empty blocks whenSPARESdrops, andRipe::now()already clampsaheadtoSPARES. Scalingspares()by the actual remaining headroom below 85% avoids overshooting on 8–16 GB cards without affecting 24 GB cards:Expected behavior
keep == false/None