Textures keep the room that frame generation already holds: fewer textures load again after eviction #3918

Closed
github-bot wants to merge 3 commits from github-bot/gh-3918 into main AGit
Owner

@⁠paales on GitHub · 2026-11-30 11:34 UTC · original
paales:fg-room-once → main · +142 −20 · 3 files · 3 commits · closed without merging

Written by 🤖:

What it changes

With frame generation, the launcher sets VICTORY_TEXTURE_ROOM_PERCENT=80 (86 when it is ready but off) and VICTORY_FRAMEGEN_ROOM_RESERVE=1: a fifth of the budget stays free for frame generation. DLSS Frame Generation keeps its resources while it is off (DLSSG_RETAIN_RESOURCES_WHEN_OFF). Once it has presented, they are in the card's use, and the budget that the system reports is the one with frame generation on. On an RTX 5070 Ti at 1440p, at the first present the use went from 10,689 to 11,029 MB and the budget from 15,227 to 14,033 MB. The fifth (2.8 GB there) then keeps the same memory free a second time.

Slot eviction starts at min(VICTORY_SLOT_EVICT_PERCENT, the queue's line), 85 when unset, and stops at most at 75 %. With the fifth, it ran between 78 and 72 % of the budget. In the intro's dialogue the camera cuts between two faces every 5 to 10 s. Eviction let go of textures of the face that was off screen, a shader read them again at the next cut, and each one showed the neutral texture until it was made again. The player sees textures go gray and load again within a few frames.

Now:

  • room_line: with the launcher's share (VICTORY_FRAMEGEN_ROOM_RESERVE), once DLSS Frame Generation is confirmed (streamline::framegen_made), the line is line_for(budget), the line without frame generation. Confirmed: a present returned S_OK and Streamline's state reports more than one presented frame, after a first sample (tyr0nsur's commit f2674725). Until then the share holds. A resize, a rearm or a new swap chain brings the share back until the next confirmation. A percent that the player sets (F1 menu or --set) holds as before, because the launcher then sets no share. FSR frame generation keeps the share.
  • slot_evict_settings: when VICTORY_SLOT_EVICT_PERCENT is unset, eviction starts at the queue's line. When VICTORY_SLOT_EVICT_LOW_PERCENT is unset too, it stops 6 % under that line. Set values hold as before.

Textures still load in at scene cuts. In the intro's montage the card is at the line, and new textures wait for memory while eviction makes room. This change lowers how often eviction lets go of a texture that a shader reads again; it does not make new textures load sooner.

The trade: shaders read a texture that eviction let go a fraction as often (with frame generation off, 276 to 1,633 slots against 7,229 to 9,314), the frame time stays the same, and new textures wait 10 to 40 % longer for memory, because eviction starts later and stops higher.

On a card of 8 GB with frame generation, the line after the first present is 90 % of the budget (line_for), where it was 80 %. I did not test this on an 8 GB card. A player can keep 80 % with VICTORY_TEXTURE_ROOM_PERCENT=80 in the F1 menu.

How it was tested

  • GPU and profile: RTX 5070 Ti 16 GB (budget 14.0 to 14.6 GB with frame generation on), 32 GB RAM, Windows 11; Series X 2560x1440, DLSS Performance, DLSS frame generation 2X, ray tracing off; VICTORY_SLOT_EVICT=1 (launcher), VICTORY_SAMPLED_EVICT=1, VICTORY_SOFT_VIEWS=1. Each run: the intro with replayed input, A held to skip the first scene, about 100 s from the hold into the boat scene, saves restored first. Launcher defaults for the texture and eviction lines in both builds.

  • Flicker: slots picked by index that eviction put to null and that a shader read again (the sampled line's "queued again", from the hold to the end).

    runs slots read again after eviction card's use, most frames over 100 ms
    before (lines 78 and 72 %) 6 7,767 to 9,282 11.9 to 12.1 GB 36 to 108
    after (92 and 86 % after the first present) 3 1,796 to 1,967 13.8 to 14.0 GB 43 to 102
  • The card stayed under its budget in every run.

  • Textures that show the neutral texture (due plus waiting for their memory, slot-seconds from the hold): 72,000 to 140,000 before, 59,000 to 110,000 after. This number varies much between runs of one build.

  • With f2674725, one run: the share went after the first generated frames (Streamline's state: 6 frames presented a query), the card's use rose to 13.8 GB, slots read again 1,002, textures waiting 56,635 slot-seconds, 107 frames over 100 ms.

  • Frame generation off in the F1 menu (the launcher sets no share; eviction lines 85 and 75 % before, 92 and 86 % after), 3 runs each, alternated:

    before after
    median frame 25.9 to 26.2 ms 25.8 to 26.7 ms
    frames over 100 ms 48 to 71 45 to 75
    preparing, mean of the fps lines 28.8 to 31.5 ms 31.4 to 33.2 ms
    slots read again after eviction 7,229 to 9,314 276 to 1,633
    textures waiting, slot-seconds 106,835 to 110,080 118,850 to 149,700
    card's use, most 12.9 to 13.0 GB 13.6 to 13.7 GB

    Without frame generation, textures wait for memory 10 to 40 % longer: eviction starts later and stops higher. Sweeps of 1,024 MB (VICTORY_SLOT_EVICT_MB) gave no clear gain, with or without frame generation.

  • Build of these runs: v2026.11.29.04 with #3043, #3553 and this change. The code this change touches is the same there as on main 41adb551.

  • For shader changes, the wave sizes tested: no shader change.

  • cargo test -p victory-gpu --lib: 923 passed, 1 failed: shader_cache::tests::every_switch_of_the_translator_is_in_the_key, which also fails on main. New tests: the_frame_generation_share_goes_once_dlss_frame_generation_has_presented, budget_waits_for_generated_frames_on_the_current_swap_chain.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related:
    • #3848 (eviction counts the card's use as the queue does) and #3454 (eviction starts over the budget): they change how slot_evict's plan counts the use; this changes its lines. Git reports a conflict of adjacent lines with each. Both parts stay.
    • #3697 (the cutoff of sampled marks clamped to the last readback): another cause of the same flicker. Merges cleanly.
    • #2718 (launcher: texture room 86 % without frame generation) and #3128 (VICTORY_SAMPLED_EVICT on by default up to 10 GB): merge cleanly.
**@⁠paales** on GitHub · 2026-11-30 11:34 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918) `paales:fg-room-once` → `main` · +142 −20 · 3 files · 3 commits · closed without merging _Written by 🤖:_ ## What it changes With frame generation, the launcher sets `VICTORY_TEXTURE_ROOM_PERCENT=80` (86 when it is ready but off) and `VICTORY_FRAMEGEN_ROOM_RESERVE=1`: a fifth of the budget stays free for frame generation. DLSS Frame Generation keeps its resources while it is off (`DLSSG_RETAIN_RESOURCES_WHEN_OFF`). Once it has presented, they are in the card's use, and the budget that the system reports is the one with frame generation on. On an RTX 5070 Ti at 1440p, at the first present the use went from 10,689 to 11,029 MB and the budget from 15,227 to 14,033 MB. The fifth (2.8 GB there) then keeps the same memory free a second time. Slot eviction starts at `min(VICTORY_SLOT_EVICT_PERCENT, the queue's line)`, 85 when unset, and stops at most at 75 %. With the fifth, it ran between 78 and 72 % of the budget. In the intro's dialogue the camera cuts between two faces every 5 to 10 s. Eviction let go of textures of the face that was off screen, a shader read them again at the next cut, and each one showed the neutral texture until it was made again. The player sees textures go gray and load again within a few frames. Now: - `room_line`: with the launcher's share (`VICTORY_FRAMEGEN_ROOM_RESERVE`), once DLSS Frame Generation is confirmed (`streamline::framegen_made`), the line is `line_for(budget)`, the line without frame generation. Confirmed: a present returned `S_OK` and Streamline's state reports more than one presented frame, after a first sample (tyr0nsur's commit f2674725). Until then the share holds. A resize, a rearm or a new swap chain brings the share back until the next confirmation. A percent that the player sets (F1 menu or `--set`) holds as before, because the launcher then sets no share. FSR frame generation keeps the share. - `slot_evict_settings`: when `VICTORY_SLOT_EVICT_PERCENT` is unset, eviction starts at the queue's line. When `VICTORY_SLOT_EVICT_LOW_PERCENT` is unset too, it stops 6 % under that line. Set values hold as before. Textures still load in at scene cuts. In the intro's montage the card is at the line, and new textures wait for memory while eviction makes room. This change lowers how often eviction lets go of a texture that a shader reads again; it does not make new textures load sooner. The trade: shaders read a texture that eviction let go a fraction as often (with frame generation off, 276 to 1,633 slots against 7,229 to 9,314), the frame time stays the same, and new textures wait 10 to 40 % longer for memory, because eviction starts later and stops higher. On a card of 8 GB with frame generation, the line after the first present is 90 % of the budget (`line_for`), where it was 80 %. I did not test this on an 8 GB card. A player can keep 80 % with `VICTORY_TEXTURE_ROOM_PERCENT=80` in the F1 menu. ## How it was tested - GPU and profile: RTX 5070 Ti 16 GB (budget 14.0 to 14.6 GB with frame generation on), 32 GB RAM, Windows 11; Series X 2560x1440, DLSS Performance, DLSS frame generation 2X, ray tracing off; `VICTORY_SLOT_EVICT=1` (launcher), `VICTORY_SAMPLED_EVICT=1`, `VICTORY_SOFT_VIEWS=1`. Each run: the intro with replayed input, A held to skip the first scene, about 100 s from the hold into the boat scene, saves restored first. Launcher defaults for the texture and eviction lines in both builds. - Flicker: slots picked by index that eviction put to null and that a shader read again (the `sampled` line's "queued again", from the hold to the end). | | runs | slots read again after eviction | card's use, most | frames over 100 ms | | --- | --- | --- | --- | --- | | before (lines 78 and 72 %) | 6 | 7,767 to 9,282 | 11.9 to 12.1 GB | 36 to 108 | | after (92 and 86 % after the first present) | 3 | 1,796 to 1,967 | 13.8 to 14.0 GB | 43 to 102 | - The card stayed under its budget in every run. - Textures that show the neutral texture (due plus waiting for their memory, slot-seconds from the hold): 72,000 to 140,000 before, 59,000 to 110,000 after. This number varies much between runs of one build. - With f2674725, one run: the share went after the first generated frames (Streamline's state: 6 frames presented a query), the card's use rose to 13.8 GB, slots read again 1,002, textures waiting 56,635 slot-seconds, 107 frames over 100 ms. - Frame generation off in the F1 menu (the launcher sets no share; eviction lines 85 and 75 % before, 92 and 86 % after), 3 runs each, alternated: | | before | after | | --- | --- | --- | | median frame | 25.9 to 26.2 ms | 25.8 to 26.7 ms | | frames over 100 ms | 48 to 71 | 45 to 75 | | preparing, mean of the fps lines | 28.8 to 31.5 ms | 31.4 to 33.2 ms | | slots read again after eviction | 7,229 to 9,314 | 276 to 1,633 | | textures waiting, slot-seconds | 106,835 to 110,080 | 118,850 to 149,700 | | card's use, most | 12.9 to 13.0 GB | 13.6 to 13.7 GB | Without frame generation, textures wait for memory 10 to 40 % longer: eviction starts later and stops higher. Sweeps of 1,024 MB (`VICTORY_SLOT_EVICT_MB`) gave no clear gain, with or without frame generation. - Build of these runs: v2026.11.29.04 with #3043, #3553 and this change. The code this change touches is the same there as on `main` 41adb551. - For shader changes, the wave sizes tested: no shader change. - `cargo test -p victory-gpu --lib`: 923 passed, 1 failed: `shader_cache::tests::every_switch_of_the_translator_is_in_the_key`, which also fails on `main`. New tests: `the_frame_generation_share_goes_once_dlss_frame_generation_has_presented`, `budget_waits_for_generated_frames_on_the_current_swap_chain`. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: - #3848 (eviction counts the card's use as the queue does) and #3454 (eviction starts over the budget): they change how `slot_evict`'s plan counts the use; this changes its lines. Git reports a conflict of adjacent lines with each. Both parts stay. - #3697 (the cutoff of sampled marks clamped to the last readback): another cause of the same flicker. Merges cleanly. - #2718 (launcher: texture room 86 % without frame generation) and #3128 (`VICTORY_SAMPLED_EVICT` on by default up to 10 GB): merge cleanly.
DLSS Frame Generation keeps its resources while it is off, so once it has presented they are in the card's use and the budget is the one with it on. The launcher's share for it (a fifth of the budget) then counted it twice, and slot eviction, whose high line stopped at 85 %, let go of textures in use far under the texture queue's line: in a cutscene they turned gray and loaded again. The share now holds until frame generation has presented, and unset eviction lines follow the queue's line.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 11:35:14 +00:00
Author
Owner

@⁠mstrmoos on GitHub · 2026-11-30 12:22 UTC · original

A data point from a different setup, in case it helps: RTX 5080 16 GB, 9800X3D, Series X profile, 1440p output, DLSS Balanced, frame generation off. Same 150 s route each run, settings file unchanged between runs. Built on 41adb551 plus a stack of other open PRs; the only difference between the runs below is this commit.

build median frame CPU preparing copies' "MB unmapped" a frame fallbacks a frame
without #3918 32.8 ms / 34.3 ms (two runs) 24.1 / 25.4 ms 0.01 / 0.10 0.1 / 0.4
with #3918 39.1 ms / 73.1 ms (two runs) 28.1 / 67.9 ms 7.11 (second run) 5.5 (second run)

(The "unmapped" and "fallbacks" figures are from the copies per frame: line of the diagnostics log.)

With frame generation off, framegen_made() never becomes true, so if I read it right the visible change on this setup is the eviction defaults: unset VICTORY_SLOT_EVICT_PERCENT now follows the texture queue's line instead of 85 %, and the low line is that less 6 instead of less 10. A narrower band near the top would fit eviction running more often in smaller steps, which is what the unmapping figure looks like. Keeping the old 85/75 defaults when frame generation has not presented might avoid it, but I have not tested that.

**@⁠mstrmoos** on GitHub · 2026-11-30 12:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7278347471) A data point from a different setup, in case it helps: RTX 5080 16 GB, 9800X3D, Series X profile, 1440p output, DLSS Balanced, frame generation **off**. Same 150 s route each run, settings file unchanged between runs. Built on 41adb551 plus a stack of other open PRs; the only difference between the runs below is this commit. | build | median frame | CPU preparing | copies' "MB unmapped" a frame | fallbacks a frame | |---|---|---|---|---| | without #3918 | 32.8 ms / 34.3 ms (two runs) | 24.1 / 25.4 ms | 0.01 / 0.10 | 0.1 / 0.4 | | with #3918 | 39.1 ms / 73.1 ms (two runs) | 28.1 / 67.9 ms | 7.11 (second run) | 5.5 (second run) | (The "unmapped" and "fallbacks" figures are from the `copies per frame:` line of the diagnostics log.) With frame generation off, `framegen_made()` never becomes true, so if I read it right the visible change on this setup is the eviction defaults: unset `VICTORY_SLOT_EVICT_PERCENT` now follows the texture queue's line instead of 85 %, and the low line is that less 6 instead of less 10. A narrower band near the top would fit eviction running more often in smaller steps, which is what the unmapping figure looks like. Keeping the old 85/75 defaults when frame generation has not presented might avoid it, but I have not tested that.
Author
Owner

@⁠tyr0nsur on GitHub · 2026-11-30 13:05 UTC · original

I checked the initial DLSSG budget transition at 9bab225c. FG_ON_ALL increments in present_begins, after accepting SetOptions (including warning 39), before DXGI Present or a Streamline state read. It can therefore remove the automatic reserve after a refused or non-generating present. It also survives a resize or rearm, which sends Off without the retain flag.

The follow-up requires the final DXGI Present (including the tearing retry) to return S_OK and Streamline to report a healthy generated frame count after a baseline sample. The baseline matters because the count covers the interval since the previous query. The confirmation survives ordinary Off with retain, and clears on resize, rearm and swap-chain replacement. It uses the existing state query and leaves the user-selected percentage path intact.

The synthetic test reproduces the early true value on the PR head. The companion tests cover rejected, occluded and out-of-VRAM samples, native-only frames, retention and reset. At a synthetic 7,000 MiB DXGI budget the automatic increase is 700 MiB, so the ordering carries more weight on the 8 GB configuration. The focused diagnostics suite passed 99 tests. This has not been measured in a title run.

Companion commit · NVIDIA Streamline DLSS-G guide

**@⁠tyr0nsur** on GitHub · 2026-11-30 13:05 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7279333105) I checked the initial DLSSG budget transition at `9bab225c`. `FG_ON_ALL` increments in `present_begins`, after accepting SetOptions (including warning 39), before DXGI Present or a Streamline state read. It can therefore remove the automatic reserve after a refused or non-generating present. It also survives a resize or rearm, which sends Off without the retain flag. The follow-up requires the final DXGI Present (including the tearing retry) to return S_OK and Streamline to report a healthy generated frame count after a baseline sample. The baseline matters because the count covers the interval since the previous query. The confirmation survives ordinary Off with retain, and clears on resize, rearm and swap-chain replacement. It uses the existing state query and leaves the user-selected percentage path intact. The synthetic test reproduces the early true value on the PR head. The companion tests cover rejected, occluded and out-of-VRAM samples, native-only frames, retention and reset. At a synthetic 7,000 MiB DXGI budget the automatic increase is 700 MiB, so the ordering carries more weight on the 8 GB configuration. The focused diagnostics suite passed 99 tests. This has not been measured in a title run. [Companion commit](https://github.com/tyr0nsur/VIctory-NVIDIA/commit/f26747255bec22c1559ddfe1c062cbd23f8e2578) · [NVIDIA Streamline DLSS-G guide](https://github.com/NVIDIA-RTX/Streamline/blob/main/docs/ProgrammingGuideDLSS_G.md#64-disabling-frame-generation)
Use successful present and Streamline readbacks to distinguish allocation from an attempted frame. Preserve the reserve during the first sample and restore it when a swap-chain resize or rearm can discard the resources.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠paales on GitHub · 2026-11-30 14:11 UTC · original

Written by 🤖:

@⁠mstrmoos I ran your case on the RTX 5070 Ti: frame generation off in the F1 menu. The launcher then sets no share, the queue's line is line_for the budget, and slot eviction runs between 92 and 86 % with this change, between 85 and 75 % without it. Each run: the intro with replayed input, about 100 s from the hold, 3 runs a build, alternated, saves restored first.

frame generation off without #3918 with #3918
median frame 25.9 to 26.2 ms 25.8 to 26.7 ms
frames over 100 ms 48 to 71 45 to 75
preparing, mean of the fps lines 28.8 to 31.5 ms 31.4 to 33.2 ms
slots read again after eviction 7,229 to 9,314 276 to 1,633
textures made again after eviction 7,480 to 11,716 286 to 1,836
textures waiting, slot-seconds 106,835 to 110,080 118,850 to 149,700
card's use, most 12.9 to 13.0 GB 13.6 to 13.7 GB

The frame time did not go up here. Two costs: textures wait for memory 10 to 40 % longer, because eviction starts later and stops higher, and preparing was 1.7 ms higher on average (the ranges touch). My release build has no copies per frame: line, so I have no numbers for "MB unmapped" or fallbacks. Eviction makes each texture again from title memory: the row "textures made again" counts those reads.

I also tried sweeps of 1,024 MB (VICTORY_SLOT_EVICT_MB) as the default for this change. Textures waiting, slot-seconds: without frame generation 79,680 to 135,180 (3 runs); with frame generation 77,305 to 134,725 (3 runs) against 58,620 to 110,175 with 256 MB (6 runs). No clear gain, so the default stays 256.

@⁠tyr0nsur I took the commit (f2674725). The state query runs after every present while frame generation is on, so the share goes two presents after the first generated frame. After a resize or a rearm the share comes back until frame generation presents again. The sweep runs once a second, so that costs at most one eviction sweep. One run with frame generation on and the commit: the card's use rose to 13.8 GB after the first generated frames; slots read again 1,002, textures waiting 56,635 slot-seconds, 107 frames over 100 ms, all in the range of the runs without it. cargo test -p victory-gpu --lib: your test passes.

**@⁠paales** on GitHub · 2026-11-30 14:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7280981268) _Written by 🤖:_ @⁠mstrmoos I ran your case on the RTX 5070 Ti: frame generation off in the F1 menu. The launcher then sets no share, the queue's line is `line_for` the budget, and slot eviction runs between 92 and 86 % with this change, between 85 and 75 % without it. Each run: the intro with replayed input, about 100 s from the hold, 3 runs a build, alternated, saves restored first. | frame generation off | without #3918 | with #3918 | | --- | --- | --- | | median frame | 25.9 to 26.2 ms | 25.8 to 26.7 ms | | frames over 100 ms | 48 to 71 | 45 to 75 | | preparing, mean of the fps lines | 28.8 to 31.5 ms | 31.4 to 33.2 ms | | slots read again after eviction | 7,229 to 9,314 | 276 to 1,633 | | textures made again after eviction | 7,480 to 11,716 | 286 to 1,836 | | textures waiting, slot-seconds | 106,835 to 110,080 | 118,850 to 149,700 | | card's use, most | 12.9 to 13.0 GB | 13.6 to 13.7 GB | The frame time did not go up here. Two costs: textures wait for memory 10 to 40 % longer, because eviction starts later and stops higher, and preparing was 1.7 ms higher on average (the ranges touch). My release build has no `copies per frame:` line, so I have no numbers for "MB unmapped" or fallbacks. Eviction makes each texture again from title memory: the row "textures made again" counts those reads. I also tried sweeps of 1,024 MB (`VICTORY_SLOT_EVICT_MB`) as the default for this change. Textures waiting, slot-seconds: without frame generation 79,680 to 135,180 (3 runs); with frame generation 77,305 to 134,725 (3 runs) against 58,620 to 110,175 with 256 MB (6 runs). No clear gain, so the default stays 256. @⁠tyr0nsur I took the commit (f2674725). The state query runs after every present while frame generation is on, so the share goes two presents after the first generated frame. After a resize or a rearm the share comes back until frame generation presents again. The sweep runs once a second, so that costs at most one eviction sweep. One run with frame generation on and the commit: the card's use rose to 13.8 GB after the first generated frames; slots read again 1,002, textures waiting 56,635 slot-seconds, 107 frames over 100 ms, all in the range of the runs without it. `cargo test -p victory-gpu --lib`: your test passes.
github-bot changed title from Textures keep the room that frame generation already holds: no gray flicker in cutscenes on a 16 GB card to Textures keep the room that frame generation already holds: fewer textures load again after eviction 2026-11-30 18:10:46 +00:00
Author
Owner

@⁠paales on GitHub · 2026-11-30 19:03 UTC · original

Written by 🤖:

The combination that I play with now, and what each step did. These runs measure the steps one after the other on one PC, not this PR alone. A bench of each PR alone, on one base with and without it, comes later.

PC: RTX 5070 Ti 16 GB, 32 GB RAM, Windows 11. Series X, 1440p, DLSS Performance.

Build: main 84bd61e2 + this PR + #1727 (HDR10) + #3553 (soft views) + #3043 (BC copies through a buffer) + #4207 (scoped writes, fill ahead).

Effective switches that differ from the launcher's:

VICTORY_MENU_FRAMEGEN=0 VICTORY_MENU_FPS=30 VICTORY_FILL_AHEAD=1 VICTORY_SAMPLED_EVICT=1 VICTORY_SOFT_VIEWS=1

The launcher sets VICTORY_SLOT_EVICT=1 and VICTORY_TEXSPK_PASS_MS=8.

Each run: a new game (settings save, no story save), one A press, the first cutscene for 60 s from its first frame, a screenshot every 5 s. A new build ran once before its measured run, to fill the shader cache and the pipeline library.

step seconds with a frame over 50 ms (of 60) over 100 ms median frame
VICTORY_TEXSPK_PASS_MS=24 (my earlier setting) 52 8 53.1 ms
the launcher's pass budget (8, doubled over 12 GB) 42 1 38.6 ms
+ #4207 with VICTORY_FILL_AHEAD=1 26 1 30.5 ms
+ a 30 fps cap (VICTORY_MENU_FPS=30) 25 2 33.4 ms
  • With the 30 fps cap, the 95th percentile frame of a second is on average 10.4 ms over the median, against 13.1 to 14.3 ms at 60 fps. 22 of 59 seconds have their 95th percentile over 1.25 times the median, against 32 to 40.
  • victory preload after a translator change took 2 minutes (25,789 shaders, 1,502 pipelines). Before it, the frames after the title's logo were 1.0 to 2.4 s: pipelines made in the run, at 167 to 234 ms each. After it, 100 to 114 ms.
  • This PR with #3848 (in main): in the intro's dialogue, no slot is put to null and read again. Earlier it was 7,000 to 9,000 a run.
  • VICTORY_SOFT_VIEWS=0 reads texture memory faster (3.2 against 2.1 GB/s), but the run had 25 seconds with a frame over 100 ms, against 2.

What is left, from #3703's line with VICTORY_LONG_FRAME_MS=50: at each cut, the texture pass (1,460 ms over 56 long frames) and waits for new memory to be resident (944 ms). Textures that are due wait 0.5 to 1.9 frames on average and up to 14: that is the pop-in at a cut.

**@⁠paales** on GitHub · 2026-11-30 19:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7288782250) _Written by 🤖:_ The combination that I play with now, and what each step did. These runs measure the steps one after the other on one PC, not this PR alone. A bench of each PR alone, on one base with and without it, comes later. PC: RTX 5070 Ti 16 GB, 32 GB RAM, Windows 11. Series X, 1440p, DLSS Performance. Build: `main` 84bd61e2 + this PR + #1727 (HDR10) + #3553 (soft views) + #3043 (BC copies through a buffer) + #4207 (scoped writes, fill ahead). Effective switches that differ from the launcher's: ``` VICTORY_MENU_FRAMEGEN=0 VICTORY_MENU_FPS=30 VICTORY_FILL_AHEAD=1 VICTORY_SAMPLED_EVICT=1 VICTORY_SOFT_VIEWS=1 ``` The launcher sets `VICTORY_SLOT_EVICT=1` and `VICTORY_TEXSPK_PASS_MS=8`. Each run: a new game (settings save, no story save), one A press, the first cutscene for 60 s from its first frame, a screenshot every 5 s. A new build ran once before its measured run, to fill the shader cache and the pipeline library. | step | seconds with a frame over 50 ms (of 60) | over 100 ms | median frame | | --- | --- | --- | --- | | `VICTORY_TEXSPK_PASS_MS=24` (my earlier setting) | 52 | 8 | 53.1 ms | | the launcher's pass budget (8, doubled over 12 GB) | 42 | 1 | 38.6 ms | | + #4207 with `VICTORY_FILL_AHEAD=1` | 26 | 1 | 30.5 ms | | + a 30 fps cap (`VICTORY_MENU_FPS=30`) | 25 | 2 | 33.4 ms | - With the 30 fps cap, the 95th percentile frame of a second is on average 10.4 ms over the median, against 13.1 to 14.3 ms at 60 fps. 22 of 59 seconds have their 95th percentile over 1.25 times the median, against 32 to 40. - `victory preload` after a translator change took 2 minutes (25,789 shaders, 1,502 pipelines). Before it, the frames after the title's logo were 1.0 to 2.4 s: pipelines made in the run, at 167 to 234 ms each. After it, 100 to 114 ms. - This PR with #3848 (in `main`): in the intro's dialogue, no slot is put to null and read again. Earlier it was 7,000 to 9,000 a run. - `VICTORY_SOFT_VIEWS=0` reads texture memory faster (3.2 against 2.1 GB/s), but the run had 25 seconds with a frame over 100 ms, against 2. What is left, from #3703's line with `VICTORY_LONG_FRAME_MS=50`: at each cut, the texture pass (1,460 ms over 56 long frames) and waits for new memory to be resident (944 ms). Textures that are due wait 0.5 to 1.9 frames on average and up to 14: that is the pop-in at a cut.
Author
Owner

@⁠mstrmoos on GitHub · 2026-12-01 01:53 UTC · original

Thanks for running it. A 16 GB card with frame generation off is the case I had in mind, and your table answers it better than I could: with this PR, textures get read and made again after eviction a fraction as often, the frame time is unchanged, and textures wait longer because eviction starts later. That's a fair trade to state in the PR text.

I won't add a run of my own for now. My bench can't exercise this change:

  • The scene: RTX 5080 16 GB, Series X, DLSS Balanced, frame generation off. I stand still for 90 s on a pier, with water in frame, people at a terrace behind and a distant shore. That's about 7,000-8,700 draws a frame.
  • Memory use: the overlay puts the card's memory at about 10.5 of 14.2 GB the whole time, so slot eviction never starts and the PR would measure as a no-op.

A route that streams, like your intro with replayed input, is the right test. I haven't built one yet. If I do, I'll run this PR on it with and without, alternated.

**@⁠mstrmoos** on GitHub · 2026-12-01 01:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7298011640) Thanks for running it. A 16 GB card with frame generation off is the case I had in mind, and your table answers it better than I could: with this PR, textures get read and made again after eviction a fraction as often, the frame time is unchanged, and textures wait longer because eviction starts later. That's a fair trade to state in the PR text. I won't add a run of my own for now. My bench can't exercise this change: - **The scene:** RTX 5080 16 GB, Series X, DLSS Balanced, frame generation off. I stand still for 90 s on a pier, with water in frame, people at a terrace behind and a distant shore. That's about 7,000-8,700 draws a frame. - **Memory use:** the overlay puts the card's memory at about 10.5 of 14.2 GB the whole time, so slot eviction never starts and the PR would measure as a no-op. A route that streams, like your intro with replayed input, is the right test. I haven't built one yet. If I do, I'll run this PR on it with and without, alternated.
Author
Owner

@⁠Trillazill on GitHub · 2026-12-01 10:07 UTC · original

An A/B of this PR on a 16 GB card at 4K with DLSS frame generation, the case it targets.

  • PC: RTX 4080 16 GB (budget about 14.9 GB with frame generation on), driver 617.42, 32 GB RAM, Windows 11.
  • Settings: Series X, 4K, DLSS Performance, DLSS frame generation 2x, ray tracing off. Launcher defaults for the texture line (VICTORY_TEXTURE_ROOM_PERCENT=80, VICTORY_FRAMEGEN_ROOM_RESERVE=1).
  • Builds: diagnostics builds of main 5fabb46e and of 5fabb46e with this PR's head c698f177 merged (it merged cleanly).
  • Runs: the prison cell, walking and turning through VICTORY_KEYS_FILE, 62 five-second lines in the world each. Alternated main, PR, main, PR on one shader cache, after a first start of the PR build for its preload.
main 1 main 2 PR 1 PR 2
Room checks saying no room, new textures wait 63 of 75 63 of 75 12 of 75 12 of 75
The queue's line, once in the world 80.0 % 80.0 % 94.9 % 94.9 %
Textures made from their small levels for want of room, since the start 91,004 86,962 34,501 32,315
Textures served for the first time, frames after they were due (mean of the 5 s lines) 2.98 3.09 2.34 2.02
fps, median / slowest 10 % of the 5 s lines 24.3 / 20.7 23.6 / 20.3 25.8 / 21.6 25.3 / 21.6
Textures waiting in the queue, median / most 2,838 / 18,141 2,983 / 15,120 2,786 / 16,613 3,054 / 17,074
The card's own memory, most in use 13,832 of 14,996 MB 13,880 of 14,996 MB 14,067 of 14,964 MB 14,202 of 14,932 MB

What this shows

  • Once frame generation was confirmed, the line went from 80 % to 94.9 % of the budget. The queue said no room in 12 checks of 75 instead of 63.
  • About 62 % fewer textures started from their small levels (blurry until they grow). Textures were served for the first time a little closer to when they were due: 2.0–2.3 frames after, against 3.0–3.1.
  • fps was 1.5–1.7 higher at the median and 0.9–1.3 higher in the slowest tenth, in both pairs. That is two runs per build, so take the fps part as a lean, not a measurement.
  • The card's use rose by 200–300 MB and stayed under the budget. No Exceeded VRAM budget, device removed or did not close line in any of the four runs, and none crashed.

What it does not show

  • The eviction half of the PR. VICTORY_SLOT_EVICT let go 0 textures in all four runs, so this card never reached it, and these runs say nothing about the re-reads after eviction in your table.
  • The waiting queue didn't shrink (median about 2,800–3,000 in both). That fits the PR text: this gives the textures room, it does not speed up the queue itself.
  • 8 GB cards, and anything with ray tracing on.

AI use: Claude Code (Claude Opus 5.5) drove the runs through the game's key file, parsed the logs and wrote this comment.

**@⁠Trillazill** on GitHub · 2026-12-01 10:07 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7307716205) An A/B of this PR on a 16 GB card at 4K with DLSS frame generation, the case it targets. - **PC:** RTX 4080 16 GB (budget about 14.9 GB with frame generation on), driver 617.42, 32 GB RAM, Windows 11. - **Settings:** Series X, 4K, DLSS Performance, DLSS frame generation 2x, ray tracing off. Launcher defaults for the texture line (`VICTORY_TEXTURE_ROOM_PERCENT=80`, `VICTORY_FRAMEGEN_ROOM_RESERVE=1`). - **Builds:** diagnostics builds of main 5fabb46e and of 5fabb46e with this PR's head c698f177 merged (it merged cleanly). - **Runs:** the prison cell, walking and turning through `VICTORY_KEYS_FILE`, 62 five-second lines in the world each. Alternated main, PR, main, PR on one shader cache, after a first start of the PR build for its preload. | | main 1 | main 2 | PR 1 | PR 2 | |---|---:|---:|---:|---:| | Room checks saying `no room, new textures wait` | 63 of 75 | 63 of 75 | 12 of 75 | 12 of 75 | | The queue's line, once in the world | 80.0 % | 80.0 % | 94.9 % | 94.9 % | | Textures made from their small levels for want of room, since the start | 91,004 | 86,962 | 34,501 | 32,315 | | Textures served for the first time, frames after they were due (mean of the 5 s lines) | 2.98 | 3.09 | 2.34 | 2.02 | | fps, median / slowest 10 % of the 5 s lines | 24.3 / 20.7 | 23.6 / 20.3 | 25.8 / 21.6 | 25.3 / 21.6 | | Textures waiting in the queue, median / most | 2,838 / 18,141 | 2,983 / 15,120 | 2,786 / 16,613 | 3,054 / 17,074 | | The card's own memory, most in use | 13,832 of 14,996 MB | 13,880 of 14,996 MB | 14,067 of 14,964 MB | 14,202 of 14,932 MB | **What this shows** - Once frame generation was confirmed, the line went from 80 % to 94.9 % of the budget. The queue said `no room` in 12 checks of 75 instead of 63. - About 62 % fewer textures started from their small levels (blurry until they grow). Textures were served for the first time a little closer to when they were due: 2.0–2.3 frames after, against 3.0–3.1. - fps was 1.5–1.7 higher at the median and 0.9–1.3 higher in the slowest tenth, in both pairs. That is two runs per build, so take the fps part as a lean, not a measurement. - The card's use rose by 200–300 MB and stayed under the budget. No `Exceeded VRAM budget`, device removed or `did not close` line in any of the four runs, and none crashed. **What it does not show** - The eviction half of the PR. `VICTORY_SLOT_EVICT` let go 0 textures in all four runs, so this card never reached it, and these runs say nothing about the re-reads after eviction in your table. - The waiting queue didn't shrink (median about 2,800–3,000 in both). That fits the PR text: this gives the textures room, it does not speed up the queue itself. - 8 GB cards, and anything with ray tracing on. AI use: Claude Code (Claude Opus 5.5) drove the runs through the game's key file, parsed the logs and wrote this comment.
github-bot closed this pull request 2026-12-01 18:51:00 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:47 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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:47 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3918#issuecomment-7321564738) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3918
No description provided.