gpu: BAR windows stop under the residency line (severely reduces textures vanishing) #48
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/48"
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 ReTerryDavis/ReVIctory. Originally posted by GiovanniFadanelli on 2026-12-04T16:53:35Z.
Summary
Severely reduces textures vanishing and reappearing in groups when ReBAR windows are on (
VICTORY_WINDOWS_BAR_MB; the launcher's "Extra GPU optimizations" ask for 1,024 MB). It does not remove the vanishing completely: some textures still disappear here and there.Windows in card memory the CPU maps were made up to a fixed 90 % of the VRAM budget, above the residency policy's line (
VICTORY_VRAM_TARGET_PERCENT, 85 % by default). Their bytes then made the policy let go of textures the title was still drawing with. This makes the windows' share the policy's line less 5 points (80 % by default), at most the 90 % it was. One function incrates/victory-gpu/src/shadow.rs, a unit test, no new switch.Evidence
RX 9070 XT (budget ~14.1 GB from Windows), 2560x1440 output, FSR 4 Quality + frame generation, 30 fps cap, scripted walking and camera turns, 10-minute unattended runs. The measure is the
card accountingline (VICTORY_STATS_LOG=1,VICTORY_CARD_ACCOUNTING=1, lines forced from the start for the test): due slots of textures shaders pick by index whose host copy was let go, i.e. textures in use missing on the card, every 5 s.Runs vary a lot (autosaves move the starting point), so the table compares interleaved repeats. In play on the same PC, with this change on a v0.5.0 build, the player reported textures no longer vanishing in groups, only now and then.
Why it happens: textures shaders pick by a computed index are asked for once, when their view is written, so by their last use they all look idle, and the residency sweep (including the urgent one for room) lets go of ones still on screen when the card is short of room. The windows above the line are what made it short.
Test plan
cargo clippy --locked -p victory-gpu --all-targets -- -D warningscargo test --locked --no-fail-fast -p victory-gpucapped_mapped_mostis unchanged)🤖 Generated with Claude Code
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.