Textures: streamed-out copies go first, neutral for gone slots, fuller blocks; soft budget and spare block cap #1551
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!1551
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1551"
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?
@tikD1337 on GitHub · 2026-11-28 21:33 UTC · original
tikD1337:tik/texture-memory→main· +502 −9 · 4 files · 2 commits · merged 2026-11-29 08:16 UTCSummary
Less of the PC's memory and the card's memory held by texture copies the title no longer shows, and fewer black slots after streaming.
On by default (each has a switch back to the old behaviour):
VICTORY_SWEEP_UNMAPPED=0: by age alone, as before.VICTORY_GONE_NEUTRAL=0: null view, as before.VICTORY_POOL_FULLEST=0: first block with room, as before.Off unless asked for:
VICTORY_TEXTURE_SOFT_MB=<MB>: a soft budget. Copies idle for 5 s are let go down to it, and a new copy is never refused.VICTORY_SPARE_BLOCKS=<n>(2..64, default 64 as now): how many empty texture blocks are kept while the card has room. They count against the PC's commit: 64 of them are 4 GiB.Diagnostics builds get a memory-line breakdown of what holds copies of streamed-out textures, the sweep limits and block fullness.
Measurements
These were measured together with other settings, not as an isolated A/B of this PR. Same RTX 4070 Ti SUPER, Series S, run to the prison and 60 s past it:
TEXTURE_SOFT_MB=7000+SPARE_BLOCKS=8+ existingWINDOW_KB=256/WINDOW_TAILS=1With #1543 (small textures in their own blocks) on top, the same set reached 24.7 GB private and 10.1 GB VRAM. No device loss and no new artefacts on the walls, faces or prison in these runs.
Test plan
cargo test --release --locked -p victory-gpu: 554 passedcargo test --profile diag --locked -p victory-gpu --features diagnostics: 608 passedcargo clippy: no new findings in the touched filesAI-assisted: the code and this description were written with Claude Code; tested on the setup above.
Labels:
pr-performance,memory,rendering,NVIDIA,series-s🤖 Generated with Claude Code
@nick0451 on GitHub · 2026-11-28 22:35 UTC · original
Tested in play: RTX 3090 24 GB (driver 610.88), i9-14900K, Windows 11. A release build of this PR merged onto main
923e38c, run in turn with main and four other PR builds. Series S, DLSS Performance, frame generation off. The same frozen save, outdoors on a balcony, standing still. A warm-up start per build, then two rounds, each run 40 s to settle and 60 s measured, then a screenshot. Main: 25.4 and 24.8 fps, 10 compute programs refused (no wave32 lowering). I compare round 2 only, because round 1 was slow for every new build.ERRORline. The picture matches main, and the same 10 programs are refused as on main, so nothing in this scene visibly depends on this change.The first start of every new build in this session crashed while loading at
+0x23cf683(main and all five PRs alike; see #628), so that is not from this change.Tested with an AI assistant (Claude Code); results are from this PC.
github-bot referenced this pull request2026-11-29 03:44:35 +00:00
@futurepro62 on GitHub · 2026-11-29 05:50 UTC · original
Tested this PR on an RTX 5070 Ti, ported onto my play build. I'm keeping it: I saw nothing get worse, fewer textures came up black, and the PR changes no shader translation. The details and how I measured are below, since my build isn't plain
main.What I saw (player's view, not measured)
Numbers (same build and settings, with and without the PR)
9ce7374)74c15e9)How to read it:
copystat::logonly runs with thediagnosticsfeature. I've added those two counters to the always-on "slots shown after their texture's upload" line locally, for the next runs.Confounds
Build
Base: fork
mainat9300875. Both builds also carry #339 (e8e2dfc), #348 at5df24f4with a local fallback-order fixcb325c5, a port of Marvisak/VIctory#3619 (#1939 here), #1074/#1145 (bdd518c,9c866db) with sampled marks switched off, and #638 (9ce7374). Uncommitted: launcher switches, and a key remap for F1/F3 (menu/panel only).How this PR went in: I cherry-picked its two commits, not the branch, because the branch sits on a newer
main(5b6d24c→6694caa,409d3a7→74c15e9; same 4 files). Two parts needed porting by hand, which I'm describing in case they matter:descriptor/host.rs: my base doesn't havemain's repacked texture queue (32-byteEntry, flag bits,by_slot/entries, side maps).FLAG_SOONbecame asoon: boolon the olderWaitingrecord.changed_soonsets it throughslots.get_mut, anddue_and_censusputs asoonslot in theagainlist, which is served first, newest write first. Your testa_streamed_out_slot_whose_memory_came_back_goes_firstpasses on it.unmake_neutralkeeps the slot's place: it doesn't callplace_back. That matters with #638's view remap, which I run.main-only code the conflicts dragged in (host_pressure_reclaimed,pool::let_go,LET_GO). I keptspare_kept()/spares_now()and your copystat lines.cargo test --release -p victory-gpu: 461 passed, 0 failed, including both of this PR's new tests.Settings
RTX 5070 Ti 16 GB (driver 32.0.16.2140), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26300,
shaders.rpfof 1.0.2.1. Launched with the fork's launcher, Series X profile, 4K output, DLSS Performance, DLSS frame generation 4x. Switches that touch textures, the same in both runs:VICTORY_TEXTURE_POOL=1,VICTORY_TEXTURE_ROOM_PERCENT=80,VICTORY_SLOT_EVICT=1,VICTORY_SLOT_EVICT_PERCENT=78,VICTORY_SHOW_AFTER=1,VICTORY_SAMPLED_MARKS=0,VICTORY_SAMPLED_EVICT=0. This PR's switches were left at their defaults:VICTORY_GONE_NEUTRAL,VICTORY_POOL_FULLESTandVICTORY_SWEEP_UNMAPPEDon, noVICTORY_TEXTURE_SOFT_MB, noVICTORY_SPARE_BLOCKS. Both builds hadvictory warmrun before play.Method
VICTORY_VIEW_REMAP=1 VICTORY_ATOMIC_SUB_LOOP=1 VICTORY_HOST_WAVE=32 VICTORY_VIEW_LIMIT=2097151 VICTORY_CACHE_DIR=<empty> victory translate shaders.rpf --validate --list. Both: 26,084 programs, 25,570 validated, identical summaries and validator failures. The per-programemitted/validatedlines differ only in the offset listed for one program that appears twice in the archive (#228150849658be29), with the same emitted hash. As expected, the PR changes no translation.victory_gpu::frame_timeslines (one every few seconds). "In the world" means windows whose median is over 20 ms; menus and loading run faster. Median and mean are over those windows' medians. "Frames over 100 ms" sums each window's "N over 100 ms" and divides by minutes in the world. The 10-minute buckets count from the first in-world window.list calls translated by threads of ours per frame: N in T mslines, over windows with N > 20,000: the sum of T over the sum of N.the texture queue's roomlines containing "no room"; the peak is the largest "MB in use" in them. The neutral count is the last "the neutral texture meanwhile in N" of theslots shown after their texture's uploadlines.victory-nvidia-20261128-195823.log(without) andvictory-nvidia-20261128-211135.log(with). I can share them if useful.🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-30 03:39 UTC · original
Tested this PR on an RTX 5070 Ti, ported onto my play build. I'm keeping it: I saw nothing get worse, fewer textures came up black, and the PR changes no shader translation. The details and how I measured are below, since my build isn't plain
main.What I saw (player's view, not measured)
Numbers (same build and settings, with and without the PR)
9ce7374)74c15e9)How to read it:
copystat::logonly runs with thediagnosticsfeature. I've added those two counters to the always-on "slots shown after their texture's upload" line locally, for the next runs.Confounds
Build
Base: fork
mainat9300875. Both builds also carry #339 (e8e2dfc), #348 at5df24f4with a local fallback-order fixcb325c5, a port of Marvisak/VIctory#3619 (#1939 here), #1074/#1145 (bdd518c,9c866db) with sampled marks switched off, and #638 (9ce7374). Uncommitted: launcher switches, and a key remap for F1/F3 (menu/panel only).How this PR went in: I cherry-picked its two commits, not the branch, because the branch sits on a newer
main(5b6d24c→6694caa,409d3a7→74c15e9; same 4 files). Two parts needed porting by hand, which I'm describing in case they matter:descriptor/host.rs: my base doesn't havemain's repacked texture queue (32-byteEntry, flag bits,by_slot/entries, side maps).FLAG_SOONbecame asoon: boolon the olderWaitingrecord.changed_soonsets it throughslots.get_mut, anddue_and_censusputs asoonslot in theagainlist, which is served first, newest write first. Your testa_streamed_out_slot_whose_memory_came_back_goes_firstpasses on it.unmake_neutralkeeps the slot's place: it doesn't callplace_back. That matters with #638's view remap, which I run.main-only code the conflicts dragged in (host_pressure_reclaimed,pool::let_go,LET_GO). I keptspare_kept()/spares_now()and your copystat lines.cargo test --release -p victory-gpu: 461 passed, 0 failed, including both of this PR's new tests.Settings
RTX 5070 Ti 16 GB (driver 32.0.16.2140), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26300,
shaders.rpfof 1.0.2.1. Launched with the fork's launcher, Series X profile, 4K output, DLSS Performance, DLSS frame generation 4x. Switches that touch textures, the same in both runs:VICTORY_TEXTURE_POOL=1,VICTORY_TEXTURE_ROOM_PERCENT=80,VICTORY_SLOT_EVICT=1,VICTORY_SLOT_EVICT_PERCENT=78,VICTORY_SHOW_AFTER=1,VICTORY_SAMPLED_MARKS=0,VICTORY_SAMPLED_EVICT=0. This PR's switches were left at their defaults:VICTORY_GONE_NEUTRAL,VICTORY_POOL_FULLESTandVICTORY_SWEEP_UNMAPPEDon, noVICTORY_TEXTURE_SOFT_MB, noVICTORY_SPARE_BLOCKS. Both builds hadvictory warmrun before play.Method
VICTORY_VIEW_REMAP=1 VICTORY_ATOMIC_SUB_LOOP=1 VICTORY_HOST_WAVE=32 VICTORY_VIEW_LIMIT=2097151 VICTORY_CACHE_DIR=<empty> victory translate shaders.rpf --validate --list. Both: 26,084 programs, 25,570 validated, identical summaries and validator failures. The per-programemitted/validatedlines differ only in the offset listed for one program that appears twice in the archive (#228150849658be29), with the same emitted hash. As expected, the PR changes no translation.victory_gpu::frame_timeslines (one every few seconds). "In the world" means windows whose median is over 20 ms; menus and loading run faster. Median and mean are over those windows' medians. "Frames over 100 ms" sums each window's "N over 100 ms" and divides by minutes in the world. The 10-minute buckets count from the first in-world window.list calls translated by threads of ours per frame: N in T mslines, over windows with N > 20,000: the sum of T over the sum of N.the texture queue's roomlines containing "no room"; the peak is the largest "MB in use" in them. The neutral count is the last "the neutral texture meanwhile in N" of theslots shown after their texture's uploadlines.victory-nvidia-20261128-195823.log(without) andvictory-nvidia-20261128-211135.log(with). I can share them if useful.🤖 Generated with Claude Code