Textures: VICTORY_SMALL_ROOM_PERCENT, the share of the budget under which small stand-ins are still made (97 by default) #4228
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4228
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4227"
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?
@Denkiyaa on GitHub · 2026-11-30 17:36 UTC · original
Denkiyaa:pr/small-room-percent→main· +804 −823 · 32 files · 11 commits · closed without mergingFixes #
What it changes
A texture that has to wait for room gets a small stand-in made from its lowest levels (
VICTORY_SMALL_WHEN_FULL), butresource::small_roommakes none once the layer is past 97 % of the card's budget. On Windows that is right: past the system's budget the card's memory spills into the PC's. Under Linux NVIDIA's driver spills nothing, and a budget set below what the card has free (VICTORY_VRAM_BUDGET_MB, which under Proton has to be set below the free memory, seedocs/linux-proton.md) leaves real room past it. There the layer sits just over its budget the whole session, and the 97 % gate refuses almost every stand-in.Observed in 8 minutes of play on main
c71899d9, under Proton (RTX 5070 Ti, budget 5,000 MB under the card's free memory): 1,723,030 stand-ins not made for "the card past 97 %", 9,541 made, 7,484 textures waiting on average. A slot without a stand-in reads as nothing, and alpha-tested foliage then discards every pixel until the sweep frees room: trees disappearing and coming back.This PR makes the share a switch,
VICTORY_SMALL_ROOM_PERCENT(read once; 97 by default, so nothing changes unless it is set; clamped to 50-200). Above 100 it is measured against the same budget, so 115 lets the layer go 15 % past it for small stand-ins. The doc comment says it is only for a budget set below what the card has free, not for the system's own budget on Windows. The small-copies line now names the share in use instead of a fixed "97 %".Files:
crates/victory-gpu/src/resource.rs(the switch,small_room),crates/victory-gpu/src/host.rs(the line's text).How it was tested
VICTORY_SMALL_ROOM_PERCENT=115, two runs of 120 s of scripted travel): none not made for that reason; textures waiting at most 4,329 and 5,971; the card's total use 13.5-13.7 of 16.3 GB, as before.cargo testpassed for the crates it touches: no, not run.victory-gpu's tests need Windows, and this was prepared on Linux. What was run:cargo xwin clippy -p victory-gpu --all-targets --locked --target x86_64-pc-windows-msvc -- -D warningson this branch (cut from main84bd61e2): it builds; the only two findings are main's own, in lines this PR does not touch (method ranged is never usedinshadow.rs:7197,manual implementation of .is_multiple_of()inhost.rs:5092), and with those two lints allowed it passes with no other warning.cargo xtask policy --stagedpassed.Checked for overlap
small_room's gate. #3918 changes the texture room line and slot eviction's percentages inresource.rs(other functions, no textual overlap expected); #3602 (8 GB cards, card use past the vkd3d cap) is about the budget under vkd3d as well, from the other side.Written with Claude Code (Claude Opus 5.5): the measurements were run by me on my PC; the code and this text were prepared with it.
🤖 Generated with Claude Code
@trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed