Textures: streamed-out copies go first, neutral for gone slots, fuller blocks; soft budget and spare block cap #1551

Manually merged
github merged 2 commits from github-bot/gh-1551 into main 2026-11-29 08:21:00 +00:00 AGit
Owner

@⁠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 UTC

Summary

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):

  • Streamed-out copies first. A host copy of a placed texture whose first page the title has unmapped, held by nothing and unused for 6 s, is let go first by the sweep, whatever the card's use. VICTORY_SWEEP_UNMAPPED=0: by age alone, as before.
  • Neutral texture for slots given up as streamed out. Previously such a slot got a null view, which reads black: shirts, walls and faces the title had streamed out for a moment stayed black until the texture pass reached their slot again (539 and 952 such slots in two runs). The slot now shows the neutral texture and goes to the front of the queue when its memory is mapped again. VICTORY_GONE_NEUTRAL=0: null view, as before.
  • Fullest block first. Texture pieces are cut from the fullest block that has room, so sparse blocks empty out and can be released. 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:

start of the day this PR + TEXTURE_SOFT_MB=7000 + SPARE_BLOCKS=8 + existing WINDOW_KB=256 / WINDOW_TAILS=1
Process private bytes, max ~30.8 GB 27.2 GB
VRAM use, max 14.3 GB 12.5 GB
Texture blocks - 8.7 GB
Prison frame rate - 21.1 fps

With #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 passed
  • cargo test --profile diag --locked -p victory-gpu --features diagnostics: 608 passed
  • cargo clippy: no new findings in the touched files
  • played on RTX 4070 Ti SUPER, driver 621.01, Ryzen 5 7600, 32 GB, Windows 11, Series S, in the prologue, the prison and the open world

AI-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

**@⁠tikD1337** on GitHub · 2026-11-28 21:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1551) `tikD1337:tik/texture-memory` → `main` · +502 −9 · 4 files · 2 commits · merged 2026-11-29 08:16 UTC ## Summary 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): - **Streamed-out copies first.** A host copy of a placed texture whose first page the title has unmapped, held by nothing and unused for 6 s, is let go first by the sweep, whatever the card's use. `VICTORY_SWEEP_UNMAPPED=0`: by age alone, as before. - **Neutral texture for slots given up as streamed out.** Previously such a slot got a null view, which reads black: shirts, walls and faces the title had streamed out for a moment stayed black until the texture pass reached their slot again (539 and 952 such slots in two runs). The slot now shows the neutral texture and goes to the front of the queue when its memory is mapped again. `VICTORY_GONE_NEUTRAL=0`: null view, as before. - **Fullest block first.** Texture pieces are cut from the fullest block that has room, so sparse blocks empty out and can be released. `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: | | start of the day | this PR + `TEXTURE_SOFT_MB=7000` + `SPARE_BLOCKS=8` + existing `WINDOW_KB=256` / `WINDOW_TAILS=1` | |---|---|---| | Process private bytes, max | ~30.8 GB | 27.2 GB | | VRAM use, max | 14.3 GB | 12.5 GB | | Texture blocks | - | 8.7 GB | | Prison frame rate | - | 21.1 fps | With #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 - [x] `cargo test --release --locked -p victory-gpu`: 554 passed - [x] `cargo test --profile diag --locked -p victory-gpu --features diagnostics`: 608 passed - [x] `cargo clippy`: no new findings in the touched files - [x] played on RTX 4070 Ti SUPER, driver 621.01, Ryzen 5 7600, 32 GB, Windows 11, Series S, in the prologue, the prison and the open world AI-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](https://claude.com/claude-code)
- Sweep: copies of placed textures whose first page the title unmapped, held
  by nothing and unused for 6 s, go first, whatever the card's use
  (VICTORY_SWEEP_UNMAPPED=0: by age alone, as before).
- A slot given up as streamed out shows the neutral texture instead of a
  null view and goes first in the queue when its memory is mapped again
  (VICTORY_GONE_NEUTRAL=0: as before).
- Texture pieces are cut from the fullest block with room, so sparse blocks
  empty and are let go (VICTORY_POOL_FULLEST=0: first block, as before).
- Diagnostics: what holds copies of streamed-out textures, sweep limits,
  block fullness.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
VICTORY_TEXTURE_SOFT_MB (off) lets copies idle 5 s go down to it and never
refuses a new one; VICTORY_SPARE_BLOCKS (64) caps the empty texture blocks
kept while the card has room.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 21:37:13 +00:00
Author
Owner

@⁠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.

  • No crash in the measured runs, no device loss and no ERROR line. The picture matches main, and the same 10 programs are refused as on main, so nothing in this scene visibly depends on this change.
  • fps in round 2: 23.4 against 24.8-25.4 for main, within this setup's noise.
  • So this is a no-harm check; the case it fixes did not show in this scene.

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.

**@⁠nick0451** on GitHub · 2026-11-28 22:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1551#issuecomment-7246845667) 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. - No crash in the measured runs, no device loss and no `ERROR` line. The picture matches main, and the same 10 programs are refused as on main, so nothing in this scene visibly depends on this change. - fps in round 2: 23.4 against 24.8-25.4 for main, within this setup's noise. - So this is a no-harm check; the case it fixes did not show in this scene. 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.
Author
Owner

@⁠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)

  • Fewer black textures. Buildings that went black and then popped in color while driving in my last session without the PR were all fine. Only a couple of black props showed here and there. There wasn't much driving in this run, though.
  • Boating looked basically flawless.
  • Black from the first frame is unchanged: the props in the opening bathroom (towel hooks, shelf items, soap dish) are still black. I expected that if those slots were never uploaded rather than given up as streamed out, which is the case this PR covers.

Numbers (same build and settings, with and without the PR)

Without (9ce7374) With (74c15e9)
In the world 52.5 min 33.9 min
Frame median / mean 71.4 / 71.1 ms 71.4 / 71.2 ms
Frames over 100 ms, whole run 27.2 per min 17.0 per min
Frames over 100 ms, per 10 min 11.8, 17.4, 33.6, 37.2, 40.8, (last 2.5 min) 9.1 7.2, 2.7, 28.9, (last 3.9 min) 48.3
"the texture queue's room" lines saying no room, per 10 min 36/115, 52/114, 114/116, 116/116, 116/116, 30/30 29/114, 5/113, 109/116, 46/46
Texture queue peak in use 13,124 MB 12,969 MB
Slots shown with the neutral texture while their upload ran (count since start) 1.12 M 3.65 M
Per list call 6.4 µs 7.7 µs
"texture picked by index changed after its upload" warnings 200 178
Streamline "frame rate over … reseting frame timer" warnings 3,159 829
Programs that don't translate / host pipelines refused 0 / 0 0 / 0

How to read it:

  • The frame times are the game's own frames before frame generation; 71.4 ms is the pacing cap on this setup (about 14 game fps, about 56 shown with 4x frame generation). So the median can't move, and the spikes are where differences show.
  • Spikes are lower in the first 20 minutes with the PR. Once the texture queue is full (no room in about every line, from about minute 20 in both runs), they climb the same way as without it. This PR doesn't move that ceiling, and I didn't expect it to.
  • The neutral count roughly tripling is what I'd expect from the PR: slots given up as streamed out now show neutral and come back through an upload, instead of reading black.
  • I don't have this PR's own counters (gone slots shown neutral, put first when back) for this run, because copystat::log only runs with the diagnostics feature. I've added those two counters to the always-on "slots shown after their texture's upload" line locally, for the next runs.

Confounds

  • Different play, different lengths: without the PR it was a bar mission, mostly indoors, for 52.5 min. With it, it was missions plus a long boat ride, for 33.9 min. Minutes 10–20 with the PR were probably the boat (open water, little streaming), which explains part of the low spike rate there.
  • One run each, so the per-call difference (6.4 vs 7.7 µs) may be noise; I haven't repeated it.
  • Nobody checked whether streamed-out slots now show as flat gray surfaces, which would be the visible cost of the neutral texture.

Build

Base: fork main at 9300875. Both builds also carry #339 (e8e2dfc), #348 at 5df24f4 with a local fallback-order fix cb325c5, 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 have main's repacked texture queue (32-byte Entry, flag bits, by_slot/entries, side maps). FLAG_SOON became a soon: bool on the older Waiting record. changed_soon sets it through slots.get_mut, and due_and_census puts a soon slot in the again list, which is served first, newest write first. Your test a_streamed_out_slot_whose_memory_came_back_goes_first passes on it.
  • unmake_neutral keeps the slot's place: it doesn't call place_back. That matters with #638's view remap, which I run.
  • I left out main-only code the conflicts dragged in (host_pressure_reclaimed, pool::let_go, LET_GO). I kept spare_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.rpf of 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_FULLEST and VICTORY_SWEEP_UNMAPPED on, no VICTORY_TEXTURE_SOFT_MB, no VICTORY_SPARE_BLOCKS. Both builds had victory warm run before play.

Method

  • Offline check (no game), empty cache each time, with and without the PR: 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-program emitted/validated lines 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.
  • Frame times: the victory_gpu::frame_times lines (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.
  • Per list call: the list calls translated by threads of ours per frame: N in T ms lines, over windows with N > 20,000: the sum of T over the sum of N.
  • Texture lines: "no room" counts the texture queue's room lines 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 the slots shown after their texture's upload lines.
  • Warning counts are plain line counts in each log.
  • Logs: victory-nvidia-20261128-195823.log (without) and victory-nvidia-20261128-211135.log (with). I can share them if useful.

🤖 Generated with Claude Code

**@⁠futurepro62** on GitHub · 2026-11-29 05:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1551#issuecomment-7251493752) 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) - **Fewer black textures.** Buildings that went black and then popped in color while driving in my last session without the PR were all fine. Only a couple of black props showed here and there. There wasn't much driving in this run, though. - **Boating** looked basically flawless. - **Black from the first frame is unchanged:** the props in the opening bathroom (towel hooks, shelf items, soap dish) are still black. I expected that if those slots were never uploaded rather than given up as streamed out, which is the case this PR covers. ### Numbers (same build and settings, with and without the PR) | | Without (`9ce7374`) | With (`74c15e9`) | |---|---|---| | In the world | 52.5 min | 33.9 min | | Frame median / mean | 71.4 / 71.1 ms | 71.4 / 71.2 ms | | Frames over 100 ms, whole run | 27.2 per min | 17.0 per min | | Frames over 100 ms, per 10 min | 11.8, 17.4, 33.6, 37.2, 40.8, (last 2.5 min) 9.1 | 7.2, 2.7, 28.9, (last 3.9 min) 48.3 | | "the texture queue's room" lines saying no room, per 10 min | 36/115, 52/114, 114/116, 116/116, 116/116, 30/30 | 29/114, 5/113, 109/116, 46/46 | | Texture queue peak in use | 13,124 MB | 12,969 MB | | Slots shown with the neutral texture while their upload ran (count since start) | 1.12 M | 3.65 M | | Per list call | 6.4 µs | 7.7 µs | | "texture picked by index changed after its upload" warnings | 200 | 178 | | Streamline "frame rate over … reseting frame timer" warnings | 3,159 | 829 | | Programs that don't translate / host pipelines refused | 0 / 0 | 0 / 0 | How to read it: - The frame times are the game's own frames before frame generation; 71.4 ms is the pacing cap on this setup (about 14 game fps, about 56 shown with 4x frame generation). So the median can't move, and the spikes are where differences show. - Spikes are lower in the first 20 minutes with the PR. Once the texture queue is full (no room in about every line, from about minute 20 in both runs), they climb the same way as without it. This PR doesn't move that ceiling, and I didn't expect it to. - The neutral count roughly tripling is what I'd expect from the PR: slots given up as streamed out now show neutral and come back through an upload, instead of reading black. - I don't have this PR's own counters (gone slots shown neutral, put first when back) for this run, because `copystat::log` only runs with the `diagnostics` feature. I've added those two counters to the always-on "slots shown after their texture's upload" line locally, for the next runs. ### Confounds - **Different play, different lengths:** without the PR it was a bar mission, mostly indoors, for 52.5 min. With it, it was missions plus a long boat ride, for 33.9 min. Minutes 10–20 with the PR were probably the boat (open water, little streaming), which explains part of the low spike rate there. - One run each, so the per-call difference (6.4 vs 7.7 µs) may be noise; I haven't repeated it. - Nobody checked whether streamed-out slots now show as flat gray surfaces, which would be the visible cost of the neutral texture. ### Build Base: fork `main` at `9300875`. Both builds also carry #339 (`e8e2dfc`), #348 at `5df24f4` with a local fallback-order fix `cb325c5`, 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 have `main`'s repacked texture queue (32-byte `Entry`, flag bits, `by_slot`/`entries`, side maps). `FLAG_SOON` became a `soon: bool` on the older `Waiting` record. `changed_soon` sets it through `slots.get_mut`, and `due_and_census` puts a `soon` slot in the `again` list, which is served first, newest write first. Your test `a_streamed_out_slot_whose_memory_came_back_goes_first` passes on it. - `unmake_neutral` keeps the slot's place: it doesn't call `place_back`. That matters with #638's view remap, which I run. - I left out `main`-only code the conflicts dragged in (`host_pressure_reclaimed`, `pool::let_go`, `LET_GO`). I kept `spare_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.rpf` of 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_FULLEST` and `VICTORY_SWEEP_UNMAPPED` on, no `VICTORY_TEXTURE_SOFT_MB`, no `VICTORY_SPARE_BLOCKS`. Both builds had `victory warm` run before play. ### Method - **Offline check (no game), empty cache each time, with and without the PR:** `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-program `emitted`/`validated` lines 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. - **Frame times:** the `victory_gpu::frame_times` lines (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. - **Per list call:** the `list calls translated by threads of ours per frame: N in T ms` lines, over windows with N > 20,000: the sum of T over the sum of N. - **Texture lines:** "no room" counts `the texture queue's room` lines 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 the `slots shown after their texture's upload` lines. - Warning counts are plain line counts in each log. - Logs: `victory-nvidia-20261128-195823.log` (without) and `victory-nvidia-20261128-211135.log` (with). I can share them if useful. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github manually merged commit b986feb536 into main 2026-11-29 08:21:00 +00:00
Author
Owner

@⁠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)

  • Fewer black textures. Buildings that went black and then popped in color while driving in my last session without the PR were all fine. Only a couple of black props showed here and there. There wasn't much driving in this run, though.
  • Boating looked basically flawless.
  • Black from the first frame is unchanged: the props in the opening bathroom (towel hooks, shelf items, soap dish) are still black. I expected that if those slots were never uploaded rather than given up as streamed out, which is the case this PR covers.

Numbers (same build and settings, with and without the PR)

Without (9ce7374) With (74c15e9)
In the world 52.5 min 33.9 min
Frame median / mean 71.4 / 71.1 ms 71.4 / 71.2 ms
Frames over 100 ms, whole run 27.2 per min 17.0 per min
Frames over 100 ms, per 10 min 11.8, 17.4, 33.6, 37.2, 40.8, (last 2.5 min) 9.1 7.2, 2.7, 28.9, (last 3.9 min) 48.3
"the texture queue's room" lines saying no room, per 10 min 36/115, 52/114, 114/116, 116/116, 116/116, 30/30 29/114, 5/113, 109/116, 46/46
Texture queue peak in use 13,124 MB 12,969 MB
Slots shown with the neutral texture while their upload ran (count since start) 1.12 M 3.65 M
Per list call 6.4 µs 7.7 µs
"texture picked by index changed after its upload" warnings 200 178
Streamline "frame rate over … reseting frame timer" warnings 3,159 829
Programs that don't translate / host pipelines refused 0 / 0 0 / 0

How to read it:

  • The frame times are the game's own frames before frame generation; 71.4 ms is the pacing cap on this setup (about 14 game fps, about 56 shown with 4x frame generation). So the median can't move, and the spikes are where differences show.
  • Spikes are lower in the first 20 minutes with the PR. Once the texture queue is full (no room in about every line, from about minute 20 in both runs), they climb the same way as without it. This PR doesn't move that ceiling, and I didn't expect it to.
  • The neutral count roughly tripling is what I'd expect from the PR: slots given up as streamed out now show neutral and come back through an upload, instead of reading black.
  • I don't have this PR's own counters (gone slots shown neutral, put first when back) for this run, because copystat::log only runs with the diagnostics feature. I've added those two counters to the always-on "slots shown after their texture's upload" line locally, for the next runs.

Confounds

  • Different play, different lengths: without the PR it was a bar mission, mostly indoors, for 52.5 min. With it, it was missions plus a long boat ride, for 33.9 min. Minutes 10–20 with the PR were probably the boat (open water, little streaming), which explains part of the low spike rate there.
  • One run each, so the per-call difference (6.4 vs 7.7 µs) may be noise; I haven't repeated it.
  • Nobody checked whether streamed-out slots now show as flat gray surfaces, which would be the visible cost of the neutral texture.

Build

Base: fork main at 9300875. Both builds also carry #339 (e8e2dfc), #348 at 5df24f4 with a local fallback-order fix cb325c5, 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 have main's repacked texture queue (32-byte Entry, flag bits, by_slot/entries, side maps). FLAG_SOON became a soon: bool on the older Waiting record. changed_soon sets it through slots.get_mut, and due_and_census puts a soon slot in the again list, which is served first, newest write first. Your test a_streamed_out_slot_whose_memory_came_back_goes_first passes on it.
  • unmake_neutral keeps the slot's place: it doesn't call place_back. That matters with #638's view remap, which I run.
  • I left out main-only code the conflicts dragged in (host_pressure_reclaimed, pool::let_go, LET_GO). I kept spare_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.rpf of 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_FULLEST and VICTORY_SWEEP_UNMAPPED on, no VICTORY_TEXTURE_SOFT_MB, no VICTORY_SPARE_BLOCKS. Both builds had victory warm run before play.

Method

  • Offline check (no game), empty cache each time, with and without the PR: 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-program emitted/validated lines 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.
  • Frame times: the victory_gpu::frame_times lines (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.
  • Per list call: the list calls translated by threads of ours per frame: N in T ms lines, over windows with N > 20,000: the sum of T over the sum of N.
  • Texture lines: "no room" counts the texture queue's room lines 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 the slots shown after their texture's upload lines.
  • Warning counts are plain line counts in each log.
  • Logs: victory-nvidia-20261128-195823.log (without) and victory-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](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1551#issuecomment-7268090615) 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) - **Fewer black textures.** Buildings that went black and then popped in color while driving in my last session without the PR were all fine. Only a couple of black props showed here and there. There wasn't much driving in this run, though. - **Boating** looked basically flawless. - **Black from the first frame is unchanged:** the props in the opening bathroom (towel hooks, shelf items, soap dish) are still black. I expected that if those slots were never uploaded rather than given up as streamed out, which is the case this PR covers. ### Numbers (same build and settings, with and without the PR) | | Without (`9ce7374`) | With (`74c15e9`) | |---|---|---| | In the world | 52.5 min | 33.9 min | | Frame median / mean | 71.4 / 71.1 ms | 71.4 / 71.2 ms | | Frames over 100 ms, whole run | 27.2 per min | 17.0 per min | | Frames over 100 ms, per 10 min | 11.8, 17.4, 33.6, 37.2, 40.8, (last 2.5 min) 9.1 | 7.2, 2.7, 28.9, (last 3.9 min) 48.3 | | "the texture queue's room" lines saying no room, per 10 min | 36/115, 52/114, 114/116, 116/116, 116/116, 30/30 | 29/114, 5/113, 109/116, 46/46 | | Texture queue peak in use | 13,124 MB | 12,969 MB | | Slots shown with the neutral texture while their upload ran (count since start) | 1.12 M | 3.65 M | | Per list call | 6.4 µs | 7.7 µs | | "texture picked by index changed after its upload" warnings | 200 | 178 | | Streamline "frame rate over … reseting frame timer" warnings | 3,159 | 829 | | Programs that don't translate / host pipelines refused | 0 / 0 | 0 / 0 | How to read it: - The frame times are the game's own frames before frame generation; 71.4 ms is the pacing cap on this setup (about 14 game fps, about 56 shown with 4x frame generation). So the median can't move, and the spikes are where differences show. - Spikes are lower in the first 20 minutes with the PR. Once the texture queue is full (no room in about every line, from about minute 20 in both runs), they climb the same way as without it. This PR doesn't move that ceiling, and I didn't expect it to. - The neutral count roughly tripling is what I'd expect from the PR: slots given up as streamed out now show neutral and come back through an upload, instead of reading black. - I don't have this PR's own counters (gone slots shown neutral, put first when back) for this run, because `copystat::log` only runs with the `diagnostics` feature. I've added those two counters to the always-on "slots shown after their texture's upload" line locally, for the next runs. ### Confounds - **Different play, different lengths:** without the PR it was a bar mission, mostly indoors, for 52.5 min. With it, it was missions plus a long boat ride, for 33.9 min. Minutes 10–20 with the PR were probably the boat (open water, little streaming), which explains part of the low spike rate there. - One run each, so the per-call difference (6.4 vs 7.7 µs) may be noise; I haven't repeated it. - Nobody checked whether streamed-out slots now show as flat gray surfaces, which would be the visible cost of the neutral texture. ### Build Base: fork `main` at `9300875`. Both builds also carry #339 (`e8e2dfc`), #348 at `5df24f4` with a local fallback-order fix `cb325c5`, 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 have `main`'s repacked texture queue (32-byte `Entry`, flag bits, `by_slot`/`entries`, side maps). `FLAG_SOON` became a `soon: bool` on the older `Waiting` record. `changed_soon` sets it through `slots.get_mut`, and `due_and_census` puts a `soon` slot in the `again` list, which is served first, newest write first. Your test `a_streamed_out_slot_whose_memory_came_back_goes_first` passes on it. - `unmake_neutral` keeps the slot's place: it doesn't call `place_back`. That matters with #638's view remap, which I run. - I left out `main`-only code the conflicts dragged in (`host_pressure_reclaimed`, `pool::let_go`, `LET_GO`). I kept `spare_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.rpf` of 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_FULLEST` and `VICTORY_SWEEP_UNMAPPED` on, no `VICTORY_TEXTURE_SOFT_MB`, no `VICTORY_SPARE_BLOCKS`. Both builds had `victory warm` run before play. ### Method - **Offline check (no game), empty cache each time, with and without the PR:** `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-program `emitted`/`validated` lines 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. - **Frame times:** the `victory_gpu::frame_times` lines (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. - **Per list call:** the `list calls translated by threads of ours per frame: N in T ms` lines, over windows with N > 20,000: the sum of T over the sum of N. - **Texture lines:** "no room" counts `the texture queue's room` lines 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 the `slots shown after their texture's upload` lines. - Warning counts are plain line counts in each log. - Logs: `victory-nvidia-20261128-195823.log` (without) and `victory-nvidia-20261128-211135.log` (with). I can share them if useful. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!1551
No description provided.