Card copies: twins and second sides counted where they lie; the queue-line cap opt-in (#3597) #4242

Closed
Lyrnc wants to merge 2 commits from upstream-pr/4242 into main
Lyrnc commented 2026-11-30 17:42:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-30T17:42:02Z.


[pr-fix] Part of #3597 (the card-copy accounting side of it, and of #3655 and #3463). Reworked on 2026-12-01 after our 8 GB bench run (details below): the room-line cap for copies, which this PR first turned on for everyone, is now opt-in and off by default. Left on by default are the accounting fixes, which change only what is counted and the copies' limits. Draft until our 8 GB run of this version matches main.

What it changes

Accounting (on by default)

These change what the copies of title buffers are counted as, and so the copies' limit (card_limits) and the room the texture queue keeps for copies not made yet (card_room_kept). They do not change the line up to which copies are made (97 % of the budget, as on main).

  1. "Before" twins are counted at their size on the card. A copy that shaders write has a twin: the hashes of its 64 KiB pieces, in a committed buffer of its own. That buffer takes at least 64 KiB of the card, but CARD_BYTES[1] counted only the hash bytes, 48 bytes for a 64 KiB copy. The new card_before_bytes(size) rounds the hash bytes up to 64 KiB. Copies' sides plus twins (card_held) count against card_limits' second number and against card_room_kept. In our runs the twins came to 16-29 MB, so this is about getting the count right more than about freeing memory.
  2. VICTORY_CARD_ALL second sides no longer count as card memory. With VICTORY_CARD_ALL=1 (a play default since v2026.11.30.01), a copy that is turned down gets a second side in the PC's memory, and card_for added its bytes to CARD_BYTES[0], the card's count, with no limit. Those bytes used up the copies' limit and the room kept for them, and they showed up in "host copies in the card's memory". They are already in the residency fallback count. They (and VICTORY_WINDOWS_OWN's) now go into their own counter, CARD_SYSTEM_BYTES. card_for and window_card_for return whether the side is on the card, Card remembers it, and Drop subtracts from the matching counter (card_count).
  3. A counting bug: with VICTORY_WINDOWS_OWN=1, freeing a window's second side subtracted from CARD_BYTES[0], which it had never been added to.
  4. The 5 s line host copies in the card's memory: ... now also prints second sides in the PC's memory N MB. The new field comes after "their bytes from before", so parsers that read the line's prefix still work.
  5. T8 / VICTORY_VRAM_BUDGET_MB: checked, and the limits already follow it. card_limits reads its budget from Host::video_memory(), which applies the cap first, so 4096 gives a limit of 737 MiB. A new test pins this. Our 8 GB runs showed card_buffers_max_mb=1474 on both main and this branch.

The room-line cap (opt-in, off by default)

VICTORY_CARD_COPY_LINE=1 keeps copies of title memory under the texture queue's line (resource::room_line; 80 % in play with frame generation) instead of 97 % of the budget. Windows and arenas already stop there (#971). It applies to card_room_for/card_admission, wc_mapped_for and window_mapped_for. VICTORY_CARD_COPY_LINE_AFTER_S=N applies it only from N seconds after the first copy got a side in the card's memory.

Why it is off by default. The first version of this PR turned it on for everyone. Our like-for-like run at an 8 GB stand-in showed the cost: RTX 5080 with VICTORY_VRAM_BUDGET_MB=8192, frame generation 3x, same save, cache and walk (https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7298013729).

main (v2026.11.30.01) first version of this PR
fps 25.1 8.1
frames over 50 ms, per 1,000 64 999
copies of title buffers turned down 128 (13 MB) 2,336 (630 MB)
copies of title buffers on the card at the end 1,058 MB 452 MB
card use, median / max (budget 8,192 MB) 8,746 / 8,962 MB 7,765 / 8,052 MB

The line kept the card under its budget, but the 630 MB of copies it turned away were read across the bus every frame. 2,272 of the 2,336 refusals came in the burst of the world's first seconds. That is why _AFTER_S exists: it leaves that burst to the 97 % line and holds only later copies to the queue's line. It has not been measured yet.

The stand-in has limits. On a 16 GB card, main's overrun of an 8 GB budget costs nothing, because the memory is there. On a real 8 GB card the system has to move memory out itself, so main may pay for its overrun in a way this run cannot show. The off-by-default choice rests on the cost we measured, not on proof that the line is wrong for real 8 GB cards.

A side note: the first version's case (copies made past the line and taking frame generation's room) did not show much on our 16 GB runs either. There, 3,417 of 3,498 copies were made in the world's first 10 seconds, under the line, and the growth past the budget came from texture copies.

Tests compile again

On main, cargo test -p victory-gpu --lib has not compiled since 7addcfc7. Two card_pass calls in host.rs's tests are missing the new capture argument. They now pass [0; 3] ("zeros otherwise", as card_pass's doc says). This is a separate commit.

How it was tested

  • GPU and profile: RTX 5080 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11.
  • Before: main and the first version of this PR, in game, on our bench (table above, and the earlier comments on this PR).
  • After: in-game runs of this version are queued on our bench: the 8 GB stand-in and 16 GB, frame generation 3x, the same save, cache and walk as the table. They will be posted here. This PR stays a draft until the 8 GB run matches main.
  • Unit tests in shadow::window_tests:
    • card_copies_stop_at_the_texture_queue_line_only_when_asked: off, copies keep the 97 % line; on, they stop at the queue's line.
    • card_copy_line_waits_for_the_first_burst: how _AFTER_S gates the line.
    • card_room_kept_counts_the_twins: with 2 GiB of copies and their twins, no room is kept.
    • card_limits_follow_a_capped_budget: 4096 / 6000 / 8192 / 10500 MiB budgets.
    • second_sides_in_the_pcs_memory_are_not_card_bytes.
  • cargo test --locked -p victory-gpu --lib: 1,119 passed, 2 failed, 66 ignored. The two failures, list::thin::tests::bindings_record_no_work and shader_cache::tests::every_switch_of_the_translator_is_in_the_key, fail the same way on main with only the card_pass fix applied (checked).
  • cargo clippy -p victory-gpu --all-targets --locked, and the same with --all-features: nothing in the lines this changes. Its warnings are already on main: ranged never used (shadow.rs, from 27d312d3), seed % 3 == 0 (host.rs test, from 7addcfc7), and with diagnostics, mb never used (copystat.rs). Because of those, workspace clippy with -D warnings already fails on main, along with loop_caps in victory-shader.
  • cargo xtask policy: one finding, already on main and in a file this does not touch (crates/victory-shader/src/native.rs).
  • For shader changes, the wave sizes tested: no shader changes.
  • Not tested: real 8 and 12 GB cards; VICTORY_CARD_COPY_LINE_AFTER_S in game; VICTORY_WINDOWS_OWN=1 and VICTORY_WC_BAR in game (those paths only changed how they count).

Not in this change

  • Nothing gives copies back when the card goes over its budget.
  • Twins are still made with no room test, and they are still one buffer each (#3592 and #945 pool them; card_before_bytes would then count what they hold).
  • The texture side of #3597: texture copies growing past the line, and slot eviction freeing 0 MB.

Checked for overlap

  • I searched the open pull requests for "card budget", "VRAM_BUDGET", "copies", "card copy", card_room_kept, CARD_ALL and "before twins". None counts the twins or the second sides, or caps where copies of title buffers stop. Related: #1998 (arenas' card room on cards of 12 GiB or less), #2940 (window_room_for), #3754 / #3848 / #3454 / #4005 (texture side), #3592 / #945 (pooled twin hashes), #3889 (ReBAR window limits).

AI use

Claude Code (Claude Opus 5.5) read the code paths, wrote the change and its tests, ran the unit tests and lints, and wrote this description. The rework follows our bench's 8 GB result, which another Claude Code session ran and posted above.

🤖 Generated with Claude Code

Real-card evidence (RTX 4070 Ti 12 GB, Luca121)

Same session, route and settings, >20 min of play each: the default (accounting only) ran with no budget overruns or errors; VICTORY_CARD_COPY_LINE=1 turned down 992 copies (68 MB) with no gain (fps the same or slightly lower near the budget, prep +2.6 ms). Details: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242 (Luca121, 2026-12-01). So the cap stays opt-in.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5570556489 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-30T17:42:02Z. --- [pr-fix] Part of #3597 (the card-copy accounting side of it, and of #3655 and #3463). Reworked on 2026-12-01 after our 8 GB bench run (details below): the room-line cap for copies, which this PR first turned on for everyone, is now opt-in and off by default. Left on by default are the accounting fixes, which change only what is counted and the copies' limits. Draft until our 8 GB run of this version matches main. ## What it changes ### Accounting (on by default) These change what the copies of title buffers are counted as, and so the copies' limit (`card_limits`) and the room the texture queue keeps for copies not made yet (`card_room_kept`). They do not change the line up to which copies are made (97 % of the budget, as on main). 1. **"Before" twins are counted at their size on the card.** A copy that shaders write has a twin: the hashes of its 64 KiB pieces, in a committed buffer of its own. That buffer takes at least 64 KiB of the card, but `CARD_BYTES[1]` counted only the hash bytes, 48 bytes for a 64 KiB copy. The new `card_before_bytes(size)` rounds the hash bytes up to 64 KiB. Copies' sides plus twins (`card_held`) count against `card_limits`' second number and against `card_room_kept`. In our runs the twins came to 16-29 MB, so this is about getting the count right more than about freeing memory. 2. **`VICTORY_CARD_ALL` second sides no longer count as card memory.** With `VICTORY_CARD_ALL=1` (a play default since v2026.11.30.01), a copy that is turned down gets a second side in the PC's memory, and `card_for` added its bytes to `CARD_BYTES[0]`, the card's count, with no limit. Those bytes used up the copies' limit and the room kept for them, and they showed up in "host copies in the card's memory". They are already in the residency fallback count. They (and `VICTORY_WINDOWS_OWN`'s) now go into their own counter, `CARD_SYSTEM_BYTES`. `card_for` and `window_card_for` return whether the side is on the card, `Card` remembers it, and `Drop` subtracts from the matching counter (`card_count`). 3. **A counting bug:** with `VICTORY_WINDOWS_OWN=1`, freeing a window's second side subtracted from `CARD_BYTES[0]`, which it had never been added to. 4. The 5 s line `host copies in the card's memory: ...` now also prints `second sides in the PC's memory N MB`. The new field comes after "their bytes from before", so parsers that read the line's prefix still work. 5. **T8 / `VICTORY_VRAM_BUDGET_MB`: checked, and the limits already follow it.** `card_limits` reads its budget from `Host::video_memory()`, which applies the cap first, so 4096 gives a limit of 737 MiB. A new test pins this. Our 8 GB runs showed `card_buffers_max_mb=1474` on both main and this branch. ### The room-line cap (opt-in, off by default) `VICTORY_CARD_COPY_LINE=1` keeps copies of title memory under the texture queue's line (`resource::room_line`; 80 % in play with frame generation) instead of 97 % of the budget. Windows and arenas already stop there (#971). It applies to `card_room_for`/`card_admission`, `wc_mapped_for` and `window_mapped_for`. `VICTORY_CARD_COPY_LINE_AFTER_S=N` applies it only from N seconds after the first copy got a side in the card's memory. **Why it is off by default.** The first version of this PR turned it on for everyone. Our like-for-like run at an 8 GB stand-in showed the cost: RTX 5080 with `VICTORY_VRAM_BUDGET_MB=8192`, frame generation 3x, same save, cache and walk (https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7298013729). | | main (v2026.11.30.01) | first version of this PR | |---|---:|---:| | fps | 25.1 | 8.1 | | frames over 50 ms, per 1,000 | 64 | 999 | | copies of title buffers turned down | 128 (13 MB) | 2,336 (630 MB) | | copies of title buffers on the card at the end | 1,058 MB | 452 MB | | card use, median / max (budget 8,192 MB) | 8,746 / 8,962 MB | 7,765 / 8,052 MB | The line kept the card under its budget, but the 630 MB of copies it turned away were read across the bus every frame. 2,272 of the 2,336 refusals came in the burst of the world's first seconds. That is why `_AFTER_S` exists: it leaves that burst to the 97 % line and holds only later copies to the queue's line. It has not been measured yet. The stand-in has limits. On a 16 GB card, main's overrun of an 8 GB budget costs nothing, because the memory is there. On a real 8 GB card the system has to move memory out itself, so main may pay for its overrun in a way this run cannot show. The off-by-default choice rests on the cost we measured, not on proof that the line is wrong for real 8 GB cards. A side note: the first version's case (copies made past the line and taking frame generation's room) did not show much on our 16 GB runs either. There, 3,417 of 3,498 copies were made in the world's first 10 seconds, under the line, and the growth past the budget came from texture copies. ### Tests compile again On main, `cargo test -p victory-gpu --lib` has not compiled since 7addcfc7. Two `card_pass` calls in host.rs's tests are missing the new `capture` argument. They now pass `[0; 3]` ("zeros otherwise", as `card_pass`'s doc says). This is a separate commit. ## How it was tested - GPU and profile: RTX 5080 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11. - Before: main and the first version of this PR, in game, on our bench (table above, and the earlier comments on this PR). - After: **in-game runs of this version are queued on our bench**: the 8 GB stand-in and 16 GB, frame generation 3x, the same save, cache and walk as the table. They will be posted here. This PR stays a draft until the 8 GB run matches main. - Unit tests in `shadow::window_tests`: - `card_copies_stop_at_the_texture_queue_line_only_when_asked`: off, copies keep the 97 % line; on, they stop at the queue's line. - `card_copy_line_waits_for_the_first_burst`: how `_AFTER_S` gates the line. - `card_room_kept_counts_the_twins`: with 2 GiB of copies and their twins, no room is kept. - `card_limits_follow_a_capped_budget`: 4096 / 6000 / 8192 / 10500 MiB budgets. - `second_sides_in_the_pcs_memory_are_not_card_bytes`. - `cargo test --locked -p victory-gpu --lib`: 1,119 passed, 2 failed, 66 ignored. The two failures, `list::thin::tests::bindings_record_no_work` and `shader_cache::tests::every_switch_of_the_translator_is_in_the_key`, fail the same way on main with only the `card_pass` fix applied (checked). - `cargo clippy -p victory-gpu --all-targets --locked`, and the same with `--all-features`: nothing in the lines this changes. Its warnings are already on main: `ranged` never used (shadow.rs, from 27d312d3), `seed % 3 == 0` (host.rs test, from 7addcfc7), and with `diagnostics`, `mb` never used (copystat.rs). Because of those, workspace clippy with `-D warnings` already fails on main, along with `loop_caps` in victory-shader. - `cargo xtask policy`: one finding, already on main and in a file this does not touch (`crates/victory-shader/src/native.rs`). - For shader changes, the wave sizes tested: no shader changes. - Not tested: real 8 and 12 GB cards; `VICTORY_CARD_COPY_LINE_AFTER_S` in game; `VICTORY_WINDOWS_OWN=1` and `VICTORY_WC_BAR` in game (those paths only changed how they count). ## Not in this change - Nothing gives copies back when the card goes over its budget. - Twins are still made with no room test, and they are still one buffer each (#3592 and #945 pool them; `card_before_bytes` would then count what they hold). - The texture side of #3597: texture copies growing past the line, and slot eviction freeing 0 MB. ## Checked for overlap - [x] I searched the open pull requests for "card budget", "VRAM_BUDGET", "copies", "card copy", `card_room_kept`, `CARD_ALL` and "before twins". None counts the twins or the second sides, or caps where copies of title buffers stop. Related: #1998 (arenas' card room on cards of 12 GiB or less), #2940 (`window_room_for`), #3754 / #3848 / #3454 / #4005 (texture side), #3592 / #945 (pooled twin hashes), #3889 (ReBAR window limits). ## AI use Claude Code (Claude Opus 5.5) read the code paths, wrote the change and its tests, ran the unit tests and lints, and wrote this description. The rework follows our bench's 8 GB result, which another Claude Code session ran and posted above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Real-card evidence (RTX 4070 Ti 12 GB, Luca121) Same session, route and settings, >20 min of play each: the default (accounting only) ran with no budget overruns or errors; `VICTORY_CARD_COPY_LINE=1` turned down 992 copies (68 MB) with no gain (fps the same or slightly lower near the budget, prep +2.6 ms). Details: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242 (Luca121, 2026-12-01). So the cap stays opt-in.
Luca121 commented 2026-11-30 21:41:52 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Luca121 on 2026-11-30T21:41:52Z.


Tested this on real 12 GB NVIDIA hardware with DLSS Frame Generation 2x in an isolated A/B comparison against origin/main (e1251c31 / v2026.11.30.03).

Test setup

  • Hardware / OS: Windows 11 (10.0.26300), i7-13700K, RTX 4070 Ti 12 GB, 32 GB RAM
  • Settings: Series S (1113x626 -> 1920x1080), DLSS Balanced + FG 2x, RT Off, Wave32, VICTORY_TEXTURE_ROOM_PERCENT=85, VICTORY_CARD_ALL=1, VICTORY_CARD_BUFFERS_MIN_KB=64
  • Builds:
    • Run A (baseline): clean origin/main (e1251c31)
    • Run B (PR #4242): PR head cd880f07 merged locally onto origin/main (e1251c31)
  • Workload: Same save, driving from the Keys into the city/docks, ~16+ min of active gameplay (draws >= 1000) per run.

Results

Metric Run A (origin/main e1251c31) Run B (#4242 cd880f07 on e1251c31)
Gameplay span (draws >= 1000) / samples 16.8 min / 187 16.3 min / 160
Rendered FPS (med / p10 / p90) 10.80 / 8.80 / 14.60 10.55 / 8.70 / 14.70
Rendered FPS at VRAM >= 80% (med / p10, n) 10.50 / 8.70 (n=145) 10.50 / 8.60 (n=156)
Rendered FPS at VRAM >= 85% (med / p10, n) (never reached 85%, peak 84.0%) 10.50 / 8.60 (n=98)
Median frame breakdown (prep / gpu / cb) 39.9 / 5.2 / 18.9 ms 39.6 / 6.4 / 19.2 ms
heaps max stall 39.7 ms 16.7 ms
DXGI local VRAM peak (of budget) / peak % 9,182 MB (of 10,955 MB) / 84.0% 9,769 MB (of 11,042 MB) / 89.7%
DXGI local VRAM end (of budget) 9,145 MB (of 10,962 MB, 83.4%) 9,736 MB (of 10,960 MB, 88.8%)
DXGI shared peak 10,331 MB 12,367 MB
Card copies in VRAM (peak -> end) 5,706 (1,979 MB) -> 4,065 (1,196 MB) 4,073 (1,982 MB) -> 3,583 (1,002 MB)
Twins (their bytes from before, peak / end) 0 MB / 0 MB 202 MB / 202 MB
Second sides in PC RAM (peak / end) (not tracked on main) 8 MB / 4 MB
kept for card copies of title buffers (end) 129 MB 0 MB
Streamline VRAM budget warnings / ERRORs / stalls 0 / 0 / 0 0 / 0 / 0

Key observations

  1. Twins and second-side accounting work as intended: origin/main reported their bytes from before 0 MB for the entire session, whereas #4242 ramped from 0 -> 202 MB over the first ~5 minutes and held at 202 MB thereafter. Because card_room_kept_of now counts copies + twins against the 1 GiB reserve, kept for card copies of title buffers dropped to 0 MB once copies + twins exceeded it (freeing the 129 MB still held at the end of Run A).
  2. VRAM card-copy cutoff at the room line + PC RAM fallback verified: Once DXGI local VRAM crossed the dynamic 85% room line (9,206–9,543 MB across the session), #4242 refused 2,304 VRAM card-copy allocations (170 MB cumulative), spilled new second sides cleanly into PC RAM (0 MB before 85%, peaking at 8 MB, 4 MB at end), and held VRAM card copies flat at 1,002–1,006 MB (settling at 1,002 MB for the last 8+ minutes) instead of expanding past the room line.
  3. No regressions under high VRAM pressure: Even across 98 gameplay samples at VRAM >= 85% (peaking at 89.7% during heavier dock/city streaming, where in texture copies peaked at 4,876 MB vs 4,359 MB in Run A), frame pacing stayed flat (10.50 med / 8.60 p10, matching Run A's >=80% window), with 0 Streamline budget warnings, 0 errors/stalls, 20,006 FG frames shown cleanly, and no visual issues observed.
  4. Unit test note: cargo test --lib on the merged tree hit two pre-existing failures (list::thin::tests::bindings_record_no_work and shader_cache::tests::every_switch_of_the_translator_is_in_the_key), both untouched by #4242.

(AI-assisted log analysis and formatting; all builds, gameplay runs, and verification were done locally on real hardware.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7292767312 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7292767312). Originally posted by [Luca121](https://github.com/Luca121) on 2026-11-30T21:41:52Z. --- Tested this on real 12 GB NVIDIA hardware with DLSS Frame Generation 2x in an isolated A/B comparison against `origin/main` (`e1251c31` / `v2026.11.30.03`). ### Test setup - **Hardware / OS:** Windows 11 (`10.0.26300`), i7-13700K, RTX 4070 Ti 12 GB, 32 GB RAM - **Settings:** Series S (`1113x626` -> `1920x1080`), DLSS Balanced + FG 2x, RT Off, Wave32, `VICTORY_TEXTURE_ROOM_PERCENT=85`, `VICTORY_CARD_ALL=1`, `VICTORY_CARD_BUFFERS_MIN_KB=64` - **Builds:** - **Run A (baseline):** clean `origin/main` (`e1251c31`) - **Run B (PR #4242):** PR head `cd880f07` merged locally onto `origin/main` (`e1251c31`) - **Workload:** Same save, driving from the Keys into the city/docks, ~16+ min of active gameplay (`draws >= 1000`) per run. ### Results | Metric | Run A (`origin/main` `e1251c31`) | Run B (`#4242` `cd880f07` on `e1251c31`) | | --- | --- | --- | | Gameplay span (`draws >= 1000`) / samples | `16.8 min` / `187` | `16.3 min` / `160` | | Rendered FPS (`med / p10 / p90`) | `10.80 / 8.80 / 14.60` | `10.55 / 8.70 / 14.70` | | Rendered FPS at `VRAM >= 80%` (`med / p10`, `n`) | `10.50 / 8.70` (`n=145`) | `10.50 / 8.60` (`n=156`) | | Rendered FPS at `VRAM >= 85%` (`med / p10`, `n`) | *(never reached `85%`, peak `84.0%`)* | `10.50 / 8.60` (`n=98`) | | Median frame breakdown (`prep / gpu / cb`) | `39.9 / 5.2 / 18.9 ms` | `39.6 / 6.4 / 19.2 ms` | | `heaps` max stall | `39.7 ms` | `16.7 ms` | | DXGI local VRAM peak (of budget) / peak % | `9,182 MB` (of `10,955 MB`) / `84.0%` | `9,769 MB` (of `11,042 MB`) / `89.7%` | | DXGI local VRAM end (of budget) | `9,145 MB` (of `10,962 MB`, `83.4%`) | `9,736 MB` (of `10,960 MB`, `88.8%`) | | DXGI shared peak | `10,331 MB` | `12,367 MB` | | Card copies in VRAM (`peak -> end`) | `5,706 (1,979 MB)` -> `4,065 (1,196 MB)` | `4,073 (1,982 MB)` -> `3,583 (1,002 MB)` | | Twins (`their bytes from before`, peak / end) | `0 MB / 0 MB` | `202 MB / 202 MB` | | Second sides in PC RAM (`peak / end`) | *(not tracked on `main`)* | `8 MB / 4 MB` | | `kept for card copies of title buffers` (end) | `129 MB` | `0 MB` | | `Streamline` VRAM budget warnings / `ERROR`s / stalls | `0 / 0 / 0` | `0 / 0 / 0` | ### Key observations 1. **Twins and second-side accounting work as intended:** `origin/main` reported `their bytes from before 0 MB` for the entire session, whereas `#4242` ramped from `0 -> 202 MB` over the first ~5 minutes and held at `202 MB` thereafter. Because `card_room_kept_of` now counts `copies + twins` against the `1 GiB` reserve, `kept for card copies of title buffers` dropped to `0 MB` once `copies + twins` exceeded it (freeing the `129 MB` still held at the end of Run A). 2. **VRAM card-copy cutoff at the room line + PC RAM fallback verified:** Once DXGI local VRAM crossed the dynamic `85%` room line (`9,206–9,543 MB` across the session), `#4242` refused `2,304` VRAM card-copy allocations (`170 MB` cumulative), spilled new second sides cleanly into PC RAM (`0 MB` before `85%`, peaking at `8 MB`, `4 MB` at end), and held VRAM card copies flat at `1,002–1,006 MB` (settling at `1,002 MB` for the last 8+ minutes) instead of expanding past the room line. 3. **No regressions under high VRAM pressure:** Even across `98` gameplay samples at `VRAM >= 85%` (peaking at `89.7%` during heavier dock/city streaming, where `in texture copies` peaked at `4,876 MB` vs `4,359 MB` in Run A), frame pacing stayed flat (`10.50` med / `8.60` p10, matching Run A's `>=80%` window), with `0` Streamline budget warnings, `0` errors/stalls, `20,006` FG frames shown cleanly, and no visual issues observed. 4. **Unit test note:** `cargo test --lib` on the merged tree hit two pre-existing failures (`list::thin::tests::bindings_record_no_work` and `shader_cache::tests::every_switch_of_the_translator_is_in_the_key`), both untouched by `#4242`. *(AI-assisted log analysis and formatting; all builds, gameplay runs, and verification were done locally on real hardware.)*
Lyrnc commented 2026-11-30 21:43:46 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-30T21:43:46Z.


Bench result for this PR: the A/B from "How it was tested", run overnight. RTX 5080 16 GB (budget 15,209 MB), Ryzen 7 9800X3D, 32 GB RAM, Windows 11. Release builds: A = v2026.11.30.01 (c71899d9), B = this PR at cd880f07. Both use one shader cache, since the translator is unchanged. Profile as in #3597's shape: Series X, 1440p, DLSS Performance setting, frame generation 3x (it was on in every run: "presents with it on" in every 5 s line). Scripted walk from the same save.

run world+s fps draws/frame >100 ms /1000 card MB in use, median / max over budget (5 s lines) "host copies in the card's memory" MB twins MB second sides in the PC's memory MB "Exceeded VRAM budget"
A1 (cold cache) 30-600 walking 29.0 6,481 8.0 12,542 / 12,570 0 % 5,066 0 (no field) 0
660-1260 standing 30.8 6,900 0.5 12,482 / 12,495 0 % 4,869 0 0
B 30-600 walking 27.5 8,364 2.8 12,637 / 12,673 0 % 5,156 29 0 0
660-1260 standing 25.8 11,145 0.8 12,670 / 12,680 0 % 5,150 29 0 0
A2 (warm, see below) 30-600 walking 22.2 7,512 3.4 12,421 / 12,528 0 % 5,023 0 (no field) 0
660-1260 standing 25.7 4,572 0.7 12,322 / 12,336 0 % 4,675 0 0
B, VICTORY_VRAM_BUDGET_MB=8192 30-540 walking 8.1 8,164 800 7,765 / 8,052 (of 8,192) 0 % 626 16 622 0

Copies of title buffers turned down. Corrected 01 Dec: the first version counted the "no card copy" log lines, but those are written for the first 64 copies and then every 32nd. These numbers come from the line's running total:

  • A1 and A2: 0.
  • B: 288 in 20 min, 23 MB in all. All came after the card passed the queue's line of 12,167 MB (80 %). The copies of title buffers held 1,073 MB of their 2,048 MB when the first was turned down, and 1,087 MB at the end.
  • B at 8 GB: 2,336, 630 MB in all, at a line of 6,553 MB. The limits line reads card_buffers_max_mb=1474, as expected. The copies held 370 MB when the first was turned down and 452 MB at the end, so most of the 1,474 MB limit went unused while 630 MB stayed in the PC's memory.

No "did not close", device removed, DEVICE_HUNG or DRED line in any run.

What this shows

  • The accounting changes work as described. The "before" twins now show at their card size (0 MB on A, 16-29 MB on B). With VICTORY_CARD_ALL second sides now have their own field: 0-1 MB at 16 GB, and 622 MB under the 8 GB cap. On A those 622 MB would have counted as card copies. The 8 GB cap gives the 1,474 MB limit.
  • Copies stop at the queue's line. At 16 GB with frame generation at 3x that is a small amount on this PC: 23 MB in 20 minutes. Under the 8 GB cap it is 630 MB.
  • This bench did not reproduce #3597's overrun. The card never went past its budget in any run (highest 12,680 of 15,209 MB, about 83 %), and Streamline printed no "Exceeded VRAM budget" line in any run. So it cannot say how much this PR helps in the case #3597 reports.

What it does not show

  • Frame rates: not a comparison.
    • A1 was the first run on a fresh shader cache: its warm-up was lost, so pipelines were built while it played.
    • A2 started right after another game session on the PC: 10,289 page-ins/s over its first 5 minutes, against 1,418 for B. It had 251 frames over 50 ms per 1,000 while walking, against 41 for B.
    • Draws per frame differ between runs by 11-29 % while walking and by up to 2.4x while standing, so the scenes were not the same.
    • B's 27.5 fps while walking against A1's 29.0 and A2's 22.2 is inside that noise.
  • The walk was ~10 minutes, not 20. The bench feeds the route through VICTORY_KEYS_FILE, and live_line caps a line's start at 600 s after it is read. Every line meant for later fired at 600 s together, so the character walked until about world+660 s and then stood still. The "standing" rows are the last 10 minutes. Each run stood at a different spot (draws differ), so card use there is not like for like either. The card-use differences between A and B (B 100-350 MB higher) follow the scene, not the build.
  • No 8 GB run on A yet. B at 8 GB ran at 8 fps with nearly every frame over 50 ms and 6.2-6.6 GB of shared memory. With 630 MB of title-buffer copies kept in the PC's memory that A would have put on the card, part of that may be this PR's doing. The same run on A (v2026.11.30.01, 8 GB, frame generation 3x) is queued next, and I will post the direct comparison here. 8 and 12 GB cards remain untested.
  • Not tested: windows the CPU maps (VICTORY_WINDOWS_OWN), VICTORY_WC_BAR, other GPUs.

AI use: Claude Code (Claude Opus 5.5) queued and watched these runs on our bench, parsed the run logs with its own scripts, and wrote this comment.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7292812957 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7292812957). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-30T21:43:46Z. --- Bench result for this PR: the A/B from "How it was tested", run overnight. RTX 5080 16 GB (budget 15,209 MB), Ryzen 7 9800X3D, 32 GB RAM, Windows 11. Release builds: **A** = v2026.11.30.01 (c71899d9), **B** = this PR at cd880f07. Both use one shader cache, since the translator is unchanged. Profile as in #3597's shape: Series X, 1440p, DLSS Performance setting, frame generation 3x (it was on in every run: "presents with it on" in every 5 s line). Scripted walk from the same save. | run | world+s | fps | draws/frame | >100 ms /1000 | card MB in use, median / max | over budget (5 s lines) | "host copies in the card's memory" MB | twins MB | second sides in the PC's memory MB | "Exceeded VRAM budget" | |---|---|---:|---:|---:|---|---:|---:|---:|---:|---:| | A1 (cold cache) | 30-600 walking | 29.0 | 6,481 | 8.0 | 12,542 / 12,570 | 0 % | 5,066 | 0 | (no field) | 0 | | | 660-1260 standing | 30.8 | 6,900 | 0.5 | 12,482 / 12,495 | 0 % | 4,869 | 0 | | 0 | | B | 30-600 walking | 27.5 | 8,364 | 2.8 | 12,637 / 12,673 | 0 % | 5,156 | 29 | 0 | 0 | | | 660-1260 standing | 25.8 | 11,145 | 0.8 | 12,670 / 12,680 | 0 % | 5,150 | 29 | 0 | 0 | | A2 (warm, see below) | 30-600 walking | 22.2 | 7,512 | 3.4 | 12,421 / 12,528 | 0 % | 5,023 | 0 | (no field) | 0 | | | 660-1260 standing | 25.7 | 4,572 | 0.7 | 12,322 / 12,336 | 0 % | 4,675 | 0 | | 0 | | B, `VICTORY_VRAM_BUDGET_MB=8192` | 30-540 walking | 8.1 | 8,164 | 800 | 7,765 / 8,052 (of 8,192) | 0 % | 626 | 16 | 622 | 0 | Copies of title buffers turned down. Corrected 01 Dec: the first version counted the "no card copy" log lines, but those are written for the first 64 copies and then every 32nd. These numbers come from the line's running total: - A1 and A2: 0. - B: 288 in 20 min, 23 MB in all. All came after the card passed the queue's line of 12,167 MB (80 %). The copies of title buffers held 1,073 MB of their 2,048 MB when the first was turned down, and 1,087 MB at the end. - B at 8 GB: 2,336, 630 MB in all, at a line of 6,553 MB. The limits line reads `card_buffers_max_mb=1474`, as expected. The copies held 370 MB when the first was turned down and 452 MB at the end, so most of the 1,474 MB limit went unused while 630 MB stayed in the PC's memory. No "did not close", device removed, `DEVICE_HUNG` or DRED line in any run. **What this shows** - The accounting changes work as described. The "before" twins now show at their card size (0 MB on A, 16-29 MB on B). With `VICTORY_CARD_ALL` second sides now have their own field: 0-1 MB at 16 GB, and 622 MB under the 8 GB cap. On A those 622 MB would have counted as card copies. The 8 GB cap gives the 1,474 MB limit. - Copies stop at the queue's line. At 16 GB with frame generation at 3x that is a small amount on this PC: 23 MB in 20 minutes. Under the 8 GB cap it is 630 MB. - This bench did not reproduce #3597's overrun. The card never went past its budget in any run (highest 12,680 of 15,209 MB, about 83 %), and Streamline printed no "Exceeded VRAM budget" line in any run. So it cannot say how much this PR helps in the case #3597 reports. **What it does not show** - **Frame rates: not a comparison.** - A1 was the first run on a fresh shader cache: its warm-up was lost, so pipelines were built while it played. - A2 started right after another game session on the PC: 10,289 page-ins/s over its first 5 minutes, against 1,418 for B. It had 251 frames over 50 ms per 1,000 while walking, against 41 for B. - Draws per frame differ between runs by 11-29 % while walking and by up to 2.4x while standing, so the scenes were not the same. - B's 27.5 fps while walking against A1's 29.0 and A2's 22.2 is inside that noise. - **The walk was ~10 minutes, not 20.** The bench feeds the route through `VICTORY_KEYS_FILE`, and `live_line` caps a line's start at 600 s after it is read. Every line meant for later fired at 600 s together, so the character walked until about world+660 s and then stood still. The "standing" rows are the last 10 minutes. Each run stood at a different spot (draws differ), so card use there is not like for like either. The card-use differences between A and B (B 100-350 MB higher) follow the scene, not the build. - **No 8 GB run on A yet.** B at 8 GB ran at 8 fps with nearly every frame over 50 ms and 6.2-6.6 GB of shared memory. With 630 MB of title-buffer copies kept in the PC's memory that A would have put on the card, part of that may be this PR's doing. The same run on A (v2026.11.30.01, 8 GB, frame generation 3x) is queued next, and I will post the direct comparison here. 8 and 12 GB cards remain untested. - Not tested: windows the CPU maps (`VICTORY_WINDOWS_OWN`), `VICTORY_WC_BAR`, other GPUs. AI use: Claude Code (Claude Opus 5.5) queued and watched these runs on our bench, parsed the run logs with its own scripts, and wrote this comment.
Lyrnc commented 2026-12-01 01:27:26 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-12-01T01:27:26Z.


Caution from our own follow-up testing; please hold this one for now.

At an 8 GB budget (VICTORY_VRAM_BUDGET_MB=8192 on the RTX 5080, as a stand-in only: the driver still has 16 GB), this branch's run with frame generation 3x averaged about 8 fps with nearly every frame over 50 ms. Main's runs at the same budget in a later session gave 28-29 fps with frame generation off and 22-24 fps at 2x, on the same profile. The likely cause is this PR's own line: 2,336 title-buffer copies (630 MB) were turned away at the 80 % mark and left in PC memory, where main keeps them on the card up to 97 %. On a small card that trades a budget overrun for reads across the bus every frame.

This is not a like-for-like A/B yet (different session, frame generation 3x vs 2x). A main control at the same 8 GB budget and frame generation 3x is queued on our bench. Until it confirms one way or the other, I'm marking this PR as a draft. If the control confirms it, the fix is to apply the room line only where it can't push copies off the card wholesale (e.g. above 12 GB, or for new copies only), and I'll say so here.

AI use: Claude Code (Claude Opus 5.5) ran the follow-up and wrote this.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7297520828 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7297520828). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-12-01T01:27:26Z. --- Caution from our own follow-up testing; please hold this one for now. At an 8 GB budget (`VICTORY_VRAM_BUDGET_MB=8192` on the RTX 5080, as a stand-in only: the driver still has 16 GB), this branch's run with frame generation 3x averaged about 8 fps with nearly every frame over 50 ms. Main's runs at the same budget in a later session gave 28-29 fps with frame generation off and 22-24 fps at 2x, on the same profile. The likely cause is this PR's own line: 2,336 title-buffer copies (630 MB) were turned away at the 80 % mark and left in PC memory, where main keeps them on the card up to 97 %. On a small card that trades a budget overrun for reads across the bus every frame. This is not a like-for-like A/B yet (different session, frame generation 3x vs 2x). A main control at the same 8 GB budget and frame generation 3x is queued on our bench. Until it confirms one way or the other, I'm marking this PR as a draft. If the control confirms it, the fix is to apply the room line only where it can't push copies off the card wholesale (e.g. above 12 GB, or for new copies only), and I'll say so here. AI use: Claude Code (Claude Opus 5.5) ran the follow-up and wrote this.
Lyrnc commented 2026-12-01 01:53:43 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-12-01T01:53:43Z.


Follow-up to my bench comment above: the 8 GB control is in. Same PC (RTX 5080 16 GB, 9800X3D, 32 GB), same profile (Series X, 1440p, DLSS Performance setting, frame generation 3x), same save, cache and walk. VICTORY_VRAM_BUDGET_MB=8192, 10-minute runs, world+30 to 540 s. A = v2026.11.30.01 (c71899d9), run this morning. B = this PR (cd880f07), run last night.

A, 8 GB B (this PR), 8 GB
fps 25.1 8.1
frames over 50 ms, per 1,000 64 999
frames over 100 ms, per 1,000 27 800
longest frame 600 ms 1,418 ms
draws per frame (median) 8,686 8,164
card MB in use, median / max (budget 8,192) 8,746 / 8,962 7,765 / 8,052
5 s lines over the budget 100 % 0 %
shared MB (the PC's memory the card uses), median 6,045-6,049 6,421-6,500
line copies of title buffers are made up to 7,946 MB (97 %) 6,553 MB (80 %, the queue's line)
copies of title buffers turned down (running total) 128, 13 MB 2,336, 630 MB
copies of title buffers held on the card at the end 1,058 MB of 1,474 452 MB of 1,474
card_buffers_max_mb (limits line) 1474 1474
"host copies in the card's memory" MB 1,150 626 (+622 MB second sides in the PC's memory)
Streamline "Exceeded VRAM budget" lines 0 0

The first and second halves of each run look the same (A: 24.9 and 25.3 fps; B: 8.4 and 7.8), so this is not a slow start.

What this shows

  • Under the 8 GB stand-in this PR costs about two thirds of the frame rate. 25 fps becomes 8, and nearly every frame takes over 50 ms. The difference matches what changed: the 80 % line turns away 2,336 copies of title buffers (630 MB) that A keeps on the card, so the card reads them over the bus every frame. Shared memory is ~400 MB higher on B.
  • A already caps those copies by the capped budget: card_buffers_max_mb=1474 on both builds, as the description says for T8. The difference is only where the copies stop: 97 % against 80 %.
  • A ran over its 8,192 MB budget in every 5 s line (up to 8,962 MB). B stayed under it, which is what the change is for.

What it does not show

  • A real 8 GB card. On this 16 GB card, A's overrun of the capped budget costs nothing, because the memory is there. On a real 8 GB card the system would have to move memory out itself, and A may pay for that in a way this stand-in cannot show. So this is a measured cost of the PR, not proof that A is better on 8 GB cards.
  • How much of the cost a softer rule would avoid, e.g. turning copies away only past the line by more than the room kept for them. Not tried.
  • At 16 GB (my comment above) the same rule turned down only 288 copies (23 MB) in 20 minutes, and the frame rate there was not comparable between runs.

AI use: Claude Code (Claude Opus 5.5) queued and read these runs on our bench and wrote this comment. The 8 GB comparison was asked for after a teammate pointed at the copies turned away.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7298013729 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7298013729). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-12-01T01:53:43Z. --- Follow-up to my bench comment above: the 8 GB control is in. Same PC (RTX 5080 16 GB, 9800X3D, 32 GB), same profile (Series X, 1440p, DLSS Performance setting, frame generation 3x), same save, cache and walk. `VICTORY_VRAM_BUDGET_MB=8192`, 10-minute runs, world+30 to 540 s. **A** = v2026.11.30.01 (c71899d9), run this morning. **B** = this PR (cd880f07), run last night. | | A, 8 GB | B (this PR), 8 GB | |---|---:|---:| | fps | 25.1 | 8.1 | | frames over 50 ms, per 1,000 | 64 | 999 | | frames over 100 ms, per 1,000 | 27 | 800 | | longest frame | 600 ms | 1,418 ms | | draws per frame (median) | 8,686 | 8,164 | | card MB in use, median / max (budget 8,192) | 8,746 / 8,962 | 7,765 / 8,052 | | 5 s lines over the budget | 100 % | 0 % | | shared MB (the PC's memory the card uses), median | 6,045-6,049 | 6,421-6,500 | | line copies of title buffers are made up to | 7,946 MB (97 %) | 6,553 MB (80 %, the queue's line) | | copies of title buffers turned down (running total) | 128, 13 MB | 2,336, 630 MB | | copies of title buffers held on the card at the end | 1,058 MB of 1,474 | 452 MB of 1,474 | | `card_buffers_max_mb` (limits line) | 1474 | 1474 | | "host copies in the card's memory" MB | 1,150 | 626 (+622 MB second sides in the PC's memory) | | Streamline "Exceeded VRAM budget" lines | 0 | 0 | The first and second halves of each run look the same (A: 24.9 and 25.3 fps; B: 8.4 and 7.8), so this is not a slow start. **What this shows** - Under the 8 GB stand-in this PR costs about two thirds of the frame rate. 25 fps becomes 8, and nearly every frame takes over 50 ms. The difference matches what changed: the 80 % line turns away 2,336 copies of title buffers (630 MB) that A keeps on the card, so the card reads them over the bus every frame. Shared memory is ~400 MB higher on B. - A already caps those copies by the capped budget: `card_buffers_max_mb=1474` on both builds, as the description says for T8. The difference is only where the copies stop: 97 % against 80 %. - A ran over its 8,192 MB budget in every 5 s line (up to 8,962 MB). B stayed under it, which is what the change is for. **What it does not show** - **A real 8 GB card.** On this 16 GB card, A's overrun of the capped budget costs nothing, because the memory is there. On a real 8 GB card the system would have to move memory out itself, and A may pay for that in a way this stand-in cannot show. So this is a measured cost of the PR, not proof that A is better on 8 GB cards. - How much of the cost a softer rule would avoid, e.g. turning copies away only past the line by more than the room kept for them. Not tried. - At 16 GB (my comment above) the same rule turned down only 288 copies (23 MB) in 20 minutes, and the frame rate there was not comparable between runs. AI use: Claude Code (Claude Opus 5.5) queued and read these runs on our bench and wrote this comment. The 8 GB comparison was asked for after a teammate pointed at the copies turned away.
Lyrnc commented 2026-12-01 03:18:59 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-12-01T03:18:59Z.


Bench result for the reworked PR (head b6770cde: only the accounting fixes by default; the queue-line cap is opt-in with VICTORY_CARD_COPY_LINE=1, off). Same PC, profile (Series X, 1440p, DLSS Performance setting, frame generation 3x), save, cache and walk as my two comments above. Release build, run this morning. Its first-start preload ran before the runs, as for the first version.

8 GB stand-in (VICTORY_VRAM_BUDGET_MB=8192), world+30 to 540 s:

main c71899d9 first version (cd880f07) reworked (b6770cde)
fps 25.1 8.1 24.1
frames over 50 ms, per 1,000 64 999 66
frames over 100 ms, per 1,000 27 800 28
longest frame 600 ms 1,418 ms 340 ms
draws per frame (median) 8,686 8,164 9,114
card MB in use, median / max (budget 8,192) 8,746 / 8,962 7,765 / 8,052 8,378 / 8,899
5 s lines over the budget 100 % 0 % 95 %
shared MB, median by 5 min 6,045-6,049 6,421-6,500 5,970-6,137
line copies are made up to 7,946 MB (97 %) 6,553 MB (80 %) 7,946 MB (97 %)
copies of title buffers turned down (running total) 128, 13 MB 2,336, 630 MB 96, 11 MB
copies of title buffers on the card at the end 1,058 MB 452 MB 1,086 MB
twins counted (MB) 0 16-29 16-28
second sides in the PC's memory (MB) (no field) 622 0

16 GB (no cap), world+30 to 600 s: the walking part, since the route stops at ~660 s, as explained above.

main, 1st run (cold cache) main, 2nd run first version reworked
fps 29.0 22.2 27.5 23.3
frames over 50 ms, per 1,000 38 251 41 202
frames over 100 ms, per 1,000 8.0 3.4 2.8 4.3
draws per frame (median) 6,481 7,512 8,364 7,592
page-ins per second, first 5 min 2,749 10,289 1,418 6,125
card MB in use, median / max (budget 15,209) 12,542 / 12,570 12,421 / 12,528 12,637 / 12,673 12,843 / 12,990
copies of title buffers turned down 0 0 288 (whole run) 0
twins counted (MB) 0 0 16-29 15-28

No device removed, DRED or "did not close" line in either run.

What this shows

  • 8 GB: the reworked PR is at main's level. 24.1 fps against 25.1, frames over 50 ms 66 against 64, over 100 ms 28 against 27. It draws 5 % more per frame in this run, so the 1 fps is inside the noise. Copies stop at main's 97 % line again (96 turned down against 128), and the 8 fps of the first version is gone.
  • The accounting fixes are in. Twins show at their card size (15-29 MB), where main counts 0. No VICTORY_CARD_ALL second sides went to the PC's memory in these runs.
  • 16 GB: no copies turned down, same as main. Frame rates follow the PC's paging state more than the build. The reworked run and main's second run started with heavy paging (6,125 and 10,289 page-ins a second). They draw within 1 % of each other and land close: 23.3 against 22.2 fps, 202 against 251 frames over 50 ms. The two runs with little paging (main's cold first run and the first version) were faster, at 27.5-29 fps.

What it does not show

  • The opt-in VICTORY_CARD_COPY_LINE=1 was not run in this round. The first version's numbers above are what the line costs at 8 GB, when it starts at once.
  • A real 8 or 12 GB card. Still the stand-in on a 16 GB card.
  • One run per arm in this round, so ±1 fps is within noise.

AI use: Claude Code (Claude Opus 5.5) ran these on our bench queue, parsed the run logs with its own scripts, and wrote this comment.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7299574666 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7299574666). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-12-01T03:18:59Z. --- Bench result for the reworked PR (head b6770cde: only the accounting fixes by default; the queue-line cap is opt-in with `VICTORY_CARD_COPY_LINE=1`, off). Same PC, profile (Series X, 1440p, DLSS Performance setting, frame generation 3x), save, cache and walk as my two comments above. Release build, run this morning. Its first-start preload ran before the runs, as for the first version. **8 GB stand-in** (`VICTORY_VRAM_BUDGET_MB=8192`), world+30 to 540 s: | | main c71899d9 | first version (cd880f07) | reworked (b6770cde) | |---|---:|---:|---:| | fps | 25.1 | 8.1 | 24.1 | | frames over 50 ms, per 1,000 | 64 | 999 | 66 | | frames over 100 ms, per 1,000 | 27 | 800 | 28 | | longest frame | 600 ms | 1,418 ms | 340 ms | | draws per frame (median) | 8,686 | 8,164 | 9,114 | | card MB in use, median / max (budget 8,192) | 8,746 / 8,962 | 7,765 / 8,052 | 8,378 / 8,899 | | 5 s lines over the budget | 100 % | 0 % | 95 % | | shared MB, median by 5 min | 6,045-6,049 | 6,421-6,500 | 5,970-6,137 | | line copies are made up to | 7,946 MB (97 %) | 6,553 MB (80 %) | 7,946 MB (97 %) | | copies of title buffers turned down (running total) | 128, 13 MB | 2,336, 630 MB | 96, 11 MB | | copies of title buffers on the card at the end | 1,058 MB | 452 MB | 1,086 MB | | twins counted (MB) | 0 | 16-29 | 16-28 | | second sides in the PC's memory (MB) | (no field) | 622 | 0 | **16 GB** (no cap), world+30 to 600 s: the walking part, since the route stops at ~660 s, as explained above. | | main, 1st run (cold cache) | main, 2nd run | first version | reworked | |---|---:|---:|---:|---:| | fps | 29.0 | 22.2 | 27.5 | 23.3 | | frames over 50 ms, per 1,000 | 38 | 251 | 41 | 202 | | frames over 100 ms, per 1,000 | 8.0 | 3.4 | 2.8 | 4.3 | | draws per frame (median) | 6,481 | 7,512 | 8,364 | 7,592 | | page-ins per second, first 5 min | 2,749 | 10,289 | 1,418 | 6,125 | | card MB in use, median / max (budget 15,209) | 12,542 / 12,570 | 12,421 / 12,528 | 12,637 / 12,673 | 12,843 / 12,990 | | copies of title buffers turned down | 0 | 0 | 288 (whole run) | 0 | | twins counted (MB) | 0 | 0 | 16-29 | 15-28 | No device removed, DRED or "did not close" line in either run. **What this shows** - **8 GB: the reworked PR is at main's level.** 24.1 fps against 25.1, frames over 50 ms 66 against 64, over 100 ms 28 against 27. It draws 5 % more per frame in this run, so the 1 fps is inside the noise. Copies stop at main's 97 % line again (96 turned down against 128), and the 8 fps of the first version is gone. - **The accounting fixes are in.** Twins show at their card size (15-29 MB), where main counts 0. No `VICTORY_CARD_ALL` second sides went to the PC's memory in these runs. - **16 GB: no copies turned down, same as main.** Frame rates follow the PC's paging state more than the build. The reworked run and main's second run started with heavy paging (6,125 and 10,289 page-ins a second). They draw within 1 % of each other and land close: 23.3 against 22.2 fps, 202 against 251 frames over 50 ms. The two runs with little paging (main's cold first run and the first version) were faster, at 27.5-29 fps. **What it does not show** - The opt-in `VICTORY_CARD_COPY_LINE=1` was not run in this round. The first version's numbers above are what the line costs at 8 GB, when it starts at once. - A real 8 or 12 GB card. Still the stand-in on a 16 GB card. - One run per arm in this round, so ±1 fps is within noise. AI use: Claude Code (Claude Opus 5.5) ran these on our bench queue, parsed the run logs with its own scripts, and wrote this comment.
Lyrnc commented 2026-12-01 03:53:27 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-12-01T03:53:27Z.


Thanks @Luca121. This is the first run of this PR on a real card of 12 GB or less, which is what it was missing.

How your run relates to the rework. You tested the first version (cd880f07), where copies of title buffers stop at the texture queue's line. At head b6770cde that line is opt-in (VICTORY_CARD_COPY_LINE=1, off by default). Only the accounting is on by default.

  • Your twins (0 → 202 MB), the second sides in PC memory (8 MB peak) and "kept for card copies" going to 0 come from the accounting. The rework doesn't change it, and your numbers show it working on a 12 GB card.
  • Your 2,304 copies turned down (170 MB) at the 85 % line come from the line, which is now off by default. With b6770cde as it is, those copies would go on the card up to main's 97 % line.
  • Your run is the only real-card result for that line, and it differs from our stand-in. At 12 GB with FG 2x the line cost no frame rate: median 10.55 against 10.80 fps, p10 8.70 against 8.80, and 10.50 / 8.60 at 85 % card use or more. On our 16 GB card capped to 8 GB, it turned away 630 MB and took 25 fps down to 8. So the line looks harmless where it turns away little and costly where it turns away a lot. That's why it's opt-in until there is more real-card data.

Two notes on the table:

  • The PR run's drive loaded more: card use peaked at 89.7 % against 84.0 %, shared memory at 12.4 against 10.3 GB, and texture copies at 4,876 against 4,359 MB. The line turns copies away, so it wouldn't raise these. With one run each, the heaps stall (16.7 against 39.7 ms) may be noise as well.
  • Your two failing tests, list::thin::tests::bindings_record_no_work and shader_cache::tests::every_switch_of_the_translator_is_in_the_key, were stale on main. #4296 fixed them there.

A request, if you have time. Could you run head b6770cde on the same card, route and settings (with your VICTORY_TEXTURE_ROOM_PERCENT=85), twice in one session?

  1. As it is (accounting only).
  2. With VICTORY_CARD_COPY_LINE=1.

That gives the cost of the opt-in line on a real 12 GB card against the new default, in one build. We can't measure that here: our only card is 16 GB, and the 8 GB cap is a stand-in (the driver still has 16 GB). The figures that matter most are the running total of "copies of title buffers turned down", card and shared memory peaks, fps p10, and any Streamline budget warning.

AI use: Claude Code (Claude Opus 5.5) compared your results with our bench runs and wrote this.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7300166503 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7300166503). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-12-01T03:53:27Z. --- Thanks @Luca121. This is the first run of this PR on a real card of 12 GB or less, which is what it was missing. **How your run relates to the rework.** You tested the first version (cd880f07), where copies of title buffers stop at the texture queue's line. At head b6770cde that line is opt-in (`VICTORY_CARD_COPY_LINE=1`, off by default). Only the accounting is on by default. - Your twins (0 → 202 MB), the second sides in PC memory (8 MB peak) and "kept for card copies" going to 0 come from the accounting. The rework doesn't change it, and your numbers show it working on a 12 GB card. - Your 2,304 copies turned down (170 MB) at the 85 % line come from the line, which is now off by default. With b6770cde as it is, those copies would go on the card up to main's 97 % line. - Your run is the only real-card result for that line, and it differs from our stand-in. At 12 GB with FG 2x the line cost no frame rate: median 10.55 against 10.80 fps, p10 8.70 against 8.80, and 10.50 / 8.60 at 85 % card use or more. On our 16 GB card capped to 8 GB, it turned away 630 MB and took 25 fps down to 8. So the line looks harmless where it turns away little and costly where it turns away a lot. That's why it's opt-in until there is more real-card data. Two notes on the table: - The PR run's drive loaded more: card use peaked at 89.7 % against 84.0 %, shared memory at 12.4 against 10.3 GB, and texture copies at 4,876 against 4,359 MB. The line turns copies away, so it wouldn't raise these. With one run each, the heaps stall (16.7 against 39.7 ms) may be noise as well. - Your two failing tests, `list::thin::tests::bindings_record_no_work` and `shader_cache::tests::every_switch_of_the_translator_is_in_the_key`, were stale on main. #4296 fixed them there. **A request, if you have time.** Could you run head b6770cde on the same card, route and settings (with your `VICTORY_TEXTURE_ROOM_PERCENT=85`), twice in one session? 1. As it is (accounting only). 2. With `VICTORY_CARD_COPY_LINE=1`. That gives the cost of the opt-in line on a real 12 GB card against the new default, in one build. We can't measure that here: our only card is 16 GB, and the 8 GB cap is a stand-in (the driver still has 16 GB). The figures that matter most are the running total of "copies of title buffers turned down", card and shared memory peaks, fps p10, and any Streamline budget warning. AI use: Claude Code (Claude Opus 5.5) compared your results with our bench runs and wrote this.
Luca121 commented 2026-12-01 18:03:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Luca121 on 2026-12-01T18:03:05Z.


Ran head b6770cde twice in one session on the same 12 GB card, route, and settings (VICTORY_TEXTURE_ROOM_PERCENT=85, warm cache shared by both runs):

  • Run 1: b6770cde as-is (default — accounting only, VICTORY_CARD_COPY_LINE off)
  • Run 2: b6770cde with --set VICTORY_CARD_COPY_LINE=1 (confirmed active at startup: copies of title memory stop at the texture queue's line (VICTORY_CARD_COPY_LINE) after_s=0)

Setup

  • Hardware / OS: Windows 11 (10.0.26300), i7-13700K, RTX 4070 Ti 12 GB, 32 GB RAM
  • Settings: Series S (1113x626 -> 1920x1080), DLSS Balanced + FG 2x, RT Off, Wave32, VICTORY_TEXTURE_ROOM_PERCENT=85, VICTORY_CARD_ALL=1, VICTORY_CARD_BUFFERS_MIN_KB=64
  • Workload: Same save, driving from the Keys into the city/docks, >20 min of active gameplay (draws >= 1000) per run.

Results (b6770cde default vs VICTORY_CARD_COPY_LINE=1)

Metric Run 1 (b6770cde default) Run 2 (b6770cde + VICTORY_CARD_COPY_LINE=1)
Gameplay span (draws >= 1000) / samples 20.3 min / 230 22.5 min / 252
Median draws/frame 8,328 8,463
Rendered FPS (med / p10 / p90) 10.90 / 9.00 / 15.20 10.75 / 9.00 / 13.90
Rendered FPS at VRAM >= 80% (med / p10, n) 10.65 / 8.90 (n=196) 10.70 / 8.90 (n=232)
Rendered FPS at VRAM >= 85% (med / p10, n) 12.10 / 9.00 (n=37) 10.70 / 9.60 (n=49)
Median frame breakdown (prep / gpu / cb) 36.35 / 5.60 / 10.45 ms 39.00 / 6.65 / 10.55 ms
heaps max stall (draws >= 1000) 13.4 ms 13.3 ms
DXGI local VRAM peak (of budget) / peak % 9,640 MB (of 11,143 MB) / 86.5% 9,934 MB (of 11,130 MB) / 89.3%
DXGI local VRAM end (of budget) 9,640 MB (of 11,145 MB, 86.5%) 9,921 MB (of 11,127 MB, 89.2%)
DXGI shared peak 11,387 MB 11,644 MB
in texture copies (peak / end) 5,176 / 5,135 MB 5,448 / 4,360 MB
Card copies in VRAM (peak -> end) 4,132 (1,985 MB) -> 3,915 (1,055 MB) 4,047 (1,982 MB) -> 4,003 (1,068 MB)
Twins (their bytes from before, peak / end) 17 MB / 17 MB 17 MB / 16 MB
Second sides in PC RAM (peak / end) 0 MB / 0 MB 7 MB / 4 MB
kept for card copies of title buffers (end) 117 MB 49 MB
Copies of title buffers turned down (running total) 0 (0 MB) 992 (68 MB)
Streamline Exceeded VRAM budget / ERRORs / DEVICE_HUNG / DRED 0 / 0 / 0 / 0 0 / 0 / 0 / 0

Takeaways

  1. No p10 FPS penalty from VICTORY_CARD_COPY_LINE=1 at 12 GB: Overall p10 was identical (9.00 vs 9.00 fps), VRAM >= 80% was flat (10.70 / 8.90 vs 10.65 / 8.90), and VRAM >= 85% held p10 at 9.60 vs 9.00. The small median gap (10.75 vs 10.90) tracks the slightly heavier load in Run 2 (8,463 vs 8,328 median draws/frame, 5,448 vs 5,176 MB peak texture copies).
  2. Cutoff & PC RAM spillover behaved as designed: In Run 1 (default 97% line), 0 copies were turned down and 0 MB went to second sides in PC RAM. In Run 2 (VICTORY_CARD_COPY_LINE=1), once VRAM crossed the 85% line (9,458 MB of 11,127 MB), 992 title-buffer copies (68 MB cumulative) were turned down while card copies held steady (908 -> 905 MB of 2,021 MB max during refusals) and second sides in PC RAM peaked at 7 MB (4 MB at end).
  3. Stability: 0 Streamline VRAM budget warnings, 0 ERRORs, 0 DEVICE_HUNG / DRED / "did not close" lines in either run.

(AI-assisted log analysis and formatting; all builds and gameplay runs were done locally on real hardware.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7320324201 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7320324201). Originally posted by [Luca121](https://github.com/Luca121) on 2026-12-01T18:03:05Z. --- Ran head `b6770cde` twice in one session on the same 12 GB card, route, and settings (`VICTORY_TEXTURE_ROOM_PERCENT=85`, warm cache shared by both runs): - **Run 1:** `b6770cde` as-is (default — accounting only, `VICTORY_CARD_COPY_LINE` off) - **Run 2:** `b6770cde` with `--set VICTORY_CARD_COPY_LINE=1` (confirmed active at startup: `copies of title memory stop at the texture queue's line (VICTORY_CARD_COPY_LINE) after_s=0`) ### Setup - **Hardware / OS:** Windows 11 (`10.0.26300`), i7-13700K, RTX 4070 Ti 12 GB, 32 GB RAM - **Settings:** Series S (`1113x626` -> `1920x1080`), DLSS Balanced + FG 2x, RT Off, Wave32, `VICTORY_TEXTURE_ROOM_PERCENT=85`, `VICTORY_CARD_ALL=1`, `VICTORY_CARD_BUFFERS_MIN_KB=64` - **Workload:** Same save, driving from the Keys into the city/docks, >20 min of active gameplay (`draws >= 1000`) per run. ### Results (`b6770cde` default vs `VICTORY_CARD_COPY_LINE=1`) | Metric | Run 1 (`b6770cde` default) | Run 2 (`b6770cde` + `VICTORY_CARD_COPY_LINE=1`) | | --- | --- | --- | | Gameplay span (`draws >= 1000`) / samples | `20.3 min` / `230` | `22.5 min` / `252` | | Median draws/frame | `8,328` | `8,463` | | Rendered FPS (`med / p10 / p90`) | `10.90 / 9.00 / 15.20` | `10.75 / 9.00 / 13.90` | | Rendered FPS at `VRAM >= 80%` (`med / p10`, `n`) | `10.65 / 8.90` (`n=196`) | `10.70 / 8.90` (`n=232`) | | Rendered FPS at `VRAM >= 85%` (`med / p10`, `n`) | `12.10 / 9.00` (`n=37`) | `10.70 / 9.60` (`n=49`) | | Median frame breakdown (`prep / gpu / cb`) | `36.35 / 5.60 / 10.45 ms` | `39.00 / 6.65 / 10.55 ms` | | `heaps` max stall (`draws >= 1000`) | `13.4 ms` | `13.3 ms` | | DXGI local VRAM peak (of budget) / peak % | `9,640 MB` (of `11,143 MB`) / `86.5%` | `9,934 MB` (of `11,130 MB`) / `89.3%` | | DXGI local VRAM end (of budget) | `9,640 MB` (of `11,145 MB`, `86.5%`) | `9,921 MB` (of `11,127 MB`, `89.2%`) | | DXGI shared peak | `11,387 MB` | `11,644 MB` | | `in texture copies` (`peak / end`) | `5,176 / 5,135 MB` | `5,448 / 4,360 MB` | | Card copies in VRAM (`peak -> end`) | `4,132 (1,985 MB)` -> `3,915 (1,055 MB)` | `4,047 (1,982 MB)` -> `4,003 (1,068 MB)` | | Twins (`their bytes from before`, peak / end) | `17 MB / 17 MB` | `17 MB / 16 MB` | | Second sides in PC RAM (`peak / end`) | `0 MB / 0 MB` | `7 MB / 4 MB` | | `kept for card copies of title buffers` (end) | `117 MB` | `49 MB` | | Copies of title buffers turned down (running total) | `0` (`0 MB`) | `992` (`68 MB`) | | Streamline `Exceeded VRAM budget` / `ERROR`s / `DEVICE_HUNG` / DRED | `0 / 0 / 0 / 0` | `0 / 0 / 0 / 0` | ### Takeaways 1. **No p10 FPS penalty from `VICTORY_CARD_COPY_LINE=1` at 12 GB:** Overall `p10` was identical (`9.00` vs `9.00` fps), `VRAM >= 80%` was flat (`10.70 / 8.90` vs `10.65 / 8.90`), and `VRAM >= 85%` held `p10` at `9.60` vs `9.00`. The small median gap (`10.75` vs `10.90`) tracks the slightly heavier load in Run 2 (`8,463` vs `8,328` median draws/frame, `5,448` vs `5,176 MB` peak texture copies). 2. **Cutoff & PC RAM spillover behaved as designed:** In Run 1 (default 97% line), `0` copies were turned down and `0 MB` went to second sides in PC RAM. In Run 2 (`VICTORY_CARD_COPY_LINE=1`), once VRAM crossed the `85%` line (`9,458 MB` of `11,127 MB`), `992` title-buffer copies (`68 MB` cumulative) were turned down while card copies held steady (`908 -> 905 MB` of `2,021 MB` max during refusals) and second sides in PC RAM peaked at `7 MB` (`4 MB` at end). 3. **Stability:** `0` Streamline VRAM budget warnings, `0` `ERROR`s, `0` `DEVICE_HUNG` / DRED / `"did not close"` lines in either run. *(AI-assisted log analysis and formatting; all builds and gameplay runs were done locally on real hardware.)*
Lyrnc commented 2026-12-01 18:06:04 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-12-01T18:06:04Z.


@Luca121 thank you for the rerun on the real 12 GB card, it settles the default. With the accounting-only default the run matches what you'd expect from main, with no budget overruns or errors. Turning the cap on (VICTORY_CARD_COPY_LINE=1) turned down 992 copies (68 MB) and bought nothing: fps the same or slightly lower in the ≥85 % band (10.7 against 12.1 median), prep +2.6 ms, and the card only slightly fuller. So the cap stays opt-in, as the reworked head has it, and the PR's default change is the counting fix (twins, second sides, the WINDOWS_OWN bug). I'll add your table to the description as the real-card evidence.

AI use: Claude Code (Claude Opus 5.5) wrote this reply.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7320403355 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7320403355). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-12-01T18:06:04Z. --- @Luca121 thank you for the rerun on the real 12 GB card, it settles the default. With the accounting-only default the run matches what you'd expect from main, with no budget overruns or errors. Turning the cap on (`VICTORY_CARD_COPY_LINE=1`) turned down 992 copies (68 MB) and bought nothing: fps the same or slightly lower in the ≥85 % band (10.7 against 12.1 median), prep +2.6 ms, and the card only slightly fuller. So the cap stays opt-in, as the reworked head has it, and the PR's default change is the counting fix (twins, second sides, the WINDOWS_OWN bug). I'll add your table to the description as the real-card evidence. AI use: Claude Code (Claude Opus 5.5) wrote this reply.
trustno1-coder commented 2026-12-01 18:45:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:45:01Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321469509 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4242#issuecomment-7321469509). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:45:01Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

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