Residency: VICTORY_FIRST_UPLOAD_GUARD=1 stops first uploads that keep an 8 GB card past its budget (off by default) #1944

Open
github-bot wants to merge 3 commits from github-bot/gh-1944 into main AGit
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 03:42 UTC · original
RomanFama592:feature/8gb-cards → main · +214 −0 · 3 files · 3 commits · open

Related #946, #1918

What it changes

VICTORY_FIRST_UPLOAD_GUARD=1 makes resource::first_upload_decision refuse, while DXGI says the card is at or past its budget, the two kinds of first upload that kept an 8 GB card growing past it:

  • a texture object of the title's (not in title memory) weighed as one byte, since the pass does not know its size: one byte always fit the free ranges (6.0 → 8.3 GB in use against a 6.8 GB budget in ten minutes; 34,108 first uploads allowed and 11 refused in five seconds);
  • textures that fit free ranges of the texture blocks while the card is over by more than those ranges hold: they are what slot eviction had just given back (125,675 went in in 18 minutes while use rose 7.7 → 9.9 GB).

Off by default; nothing changes without the switch. With it, nothing changes under the budget either, or just past it with free ranges to spare.

Past its budget Windows pages the card's memory, and the frame rate falls with how far over the card is. The cost: a refused slot shows the neutral texture until there is room, so in a new place floors and walls can stay grey for a few seconds, until eviction lets go of the old place's textures.

docs/8gb-cards.md: why the budget decides the frame rate on these cards, this switch and VICTORY_RESIDENCY_PRIORITY (#3804), what is still open (linked from docs/windows-memory.md).

How it was tested

  • GPU and profile: RTX 4060 Ti 8 GB (budget 6.6–7.2 GB), Ryzen 9 5900X, 64 GB, Windows 11; Series X at 1440p, DLSS balanced, frame generation off, ray tracing off.
  • Off against on, the same places, 8–18 minutes each:
past the budget Streamline budget warnings GPU a frame (median) fps (median)
without the switch 2–3 GB, growing 5,153 in 18 minutes 89–234 ms 3–5
VICTORY_FIRST_UPLOAD_GUARD=1 150–780 MB, no longer growing none 8–81 ms 5–12
  • What is still paged past the budget keeps the frame rate low on its own; with VICTORY_RESIDENCY_PRIORITY=1 (#3804) as well, the same card went from 3.4 to 14.9 fps.
  • A second RTX 4060 Ti 8 GB with an i5-13400F (thanks @⁠kraiy404): Streamline budget warnings from 8–5,206 to 0, and frame generation showed frames where it was on but generated nothing before.
  • An RTX 4060 Laptop 8 GB with 16 GB of RAM (thanks @⁠Roybill203): the out-of-memory loop at world entry was gone.
  • cargo test -p victory-gpu --lib on this head (current main): the test target does not build on current main (two card_pass calls in host.rs's tests miss their new last argument); with those two calls given [0; 3] locally, 1115 passed, including the new past_the_budget_a_texture_of_unknown_size_is_not_admitted, and 2 failed that fail on current main too (shader_cache::tests::every_switch_of_the_translator_is_in_the_key, list::thin::tests::bindings_record_no_work). Clippy: no finding in the lines this changes.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related:
    • #3804 (merged, VICTORY_RESIDENCY_PRIORITY): which memory Windows pages first; independent of this (different files). This was part of it before.
    • #1771 (merged) sizes View::Shader textures in the admission, the better fix for the one-byte case; this only refuses them past the budget, so the two fit together.
    • #1805 and #1677 touch the same admission; #1496 is the over-budget free-range rule this narrows (its test is unchanged: without the switch nothing changes).
    • #3406 checks the real allocation of a first upload against the VRAM left and acts after this admission; #2347 changes the first-upload window, not this decision; #3397 adds a parameter to first_upload_decision (a small rebase for whichever lands second).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WiREjDTE7b3pRCmCoV3FDx

**@⁠RomanFama592** on GitHub · 2026-11-29 03:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944) `RomanFama592:feature/8gb-cards` → `main` · +214 −0 · 3 files · 3 commits · open Related #946, #1918 ## What it changes `VICTORY_FIRST_UPLOAD_GUARD=1` makes `resource::first_upload_decision` refuse, while DXGI says the card is at or past its budget, the two kinds of first upload that kept an 8 GB card growing past it: - a texture object of the title's (not in title memory) weighed as one byte, since the pass does not know its size: one byte always fit the free ranges (6.0 → 8.3 GB in use against a 6.8 GB budget in ten minutes; 34,108 first uploads allowed and 11 refused in five seconds); - textures that fit free ranges of the texture blocks while the card is over by more than those ranges hold: they are what slot eviction had just given back (125,675 went in in 18 minutes while use rose 7.7 → 9.9 GB). Off by default; nothing changes without the switch. With it, nothing changes under the budget either, or just past it with free ranges to spare. Past its budget Windows pages the card's memory, and the frame rate falls with how far over the card is. The cost: a refused slot shows the neutral texture until there is room, so in a new place floors and walls can stay grey for a few seconds, until eviction lets go of the old place's textures. `docs/8gb-cards.md`: why the budget decides the frame rate on these cards, this switch and `VICTORY_RESIDENCY_PRIORITY` (#3804), what is still open (linked from `docs/windows-memory.md`). ## How it was tested - GPU and profile: RTX 4060 Ti 8 GB (budget 6.6–7.2 GB), Ryzen 9 5900X, 64 GB, Windows 11; Series X at 1440p, DLSS balanced, frame generation off, ray tracing off. - Off against on, the same places, 8–18 minutes each: | | past the budget | Streamline budget warnings | GPU a frame (median) | fps (median) | |---|---|---|---|---| | without the switch | 2–3 GB, growing | 5,153 in 18 minutes | 89–234 ms | 3–5 | | `VICTORY_FIRST_UPLOAD_GUARD=1` | 150–780 MB, no longer growing | none | 8–81 ms | 5–12 | - What is still paged past the budget keeps the frame rate low on its own; with `VICTORY_RESIDENCY_PRIORITY=1` (#3804) as well, the same card went from 3.4 to 14.9 fps. - A second RTX 4060 Ti 8 GB with an i5-13400F (thanks @⁠kraiy404): Streamline budget warnings from 8–5,206 to 0, and frame generation showed frames where it was on but generated nothing before. - An RTX 4060 Laptop 8 GB with 16 GB of RAM (thanks @⁠Roybill203): the out-of-memory loop at world entry was gone. - `cargo test -p victory-gpu --lib` on this head (current main): the test target does not build on current main (two `card_pass` calls in `host.rs`'s tests miss their new last argument); with those two calls given `[0; 3]` locally, 1115 passed, including the new `past_the_budget_a_texture_of_unknown_size_is_not_admitted`, and 2 failed that fail on current main too (`shader_cache::tests::every_switch_of_the_translator_is_in_the_key`, `list::thin::tests::bindings_record_no_work`). Clippy: no finding in the lines this changes. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: - #3804 (merged, `VICTORY_RESIDENCY_PRIORITY`): which memory Windows pages first; independent of this (different files). This was part of it before. - #1771 (merged) sizes `View::Shader` textures in the admission, the better fix for the one-byte case; this only refuses them past the budget, so the two fit together. - #1805 and #1677 touch the same admission; #1496 is the over-budget free-range rule this narrows (its test is unchanged: without the switch nothing changes). - #3406 checks the real allocation of a first upload against the VRAM left and acts after this admission; #2347 changes the first-upload window, not this decision; #3397 adds a parameter to `first_upload_decision` (a small rebase for whichever lands second). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WiREjDTE7b3pRCmCoV3FDx
Past the DXGI budget the black-face fix's first-upload admission let the card grow for good on an RTX 4060 Ti 8 GB: texture objects of unknown size were weighed as one byte (6.0 to 8.3 GB against 6.8 in ten minutes), and textures that fit free ranges refilled what slot eviction had just given back (125,675 in 18 minutes, 7.7 to 9.9 GB). Windows then paged the card: 89 to 234 ms of GPU a frame, 3 to 5 fps. Past the budget neither is admitted now; under it, and just past it with free ranges to spare, nothing changes (6.8 / 6.7 GB, 12 to 14 fps on the same card).

Opt-in, off by default:
- VICTORY_PRESSURE_LEVELS=1..3: without room, a large block-compressed placed texture gets a host copy 1 to 3 levels short instead of waiting, and stays so while the card has no room.
- VICTORY_RESIDENCY_PRIORITY=1: render targets, depth and UAV memory get high residency priority, so textures page out first.

See docs/8gb-cards.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
#888 keeps an EXEC skip around any loop whose way out is not proven. On a 32-lane host that left 75 wave64 programs of the title's set without a 32-lane form (TAA and denoising resolves, shadow and water classification, particles) until the wave-wide fallback took them. VICTORY_LOOP_GUARDS=0 runs the earlier search (a skip stays only when a chain of decided branches comes back on itself), to compare cost and picture against the fallback. On by default: nothing changes unless it is set. In the shader cache's key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 03:44:35 +00:00
github-bot changed title from 8 GB cards: no first uploads past the budget; opt-in switches, native build, docs to 8 GB cards: past the budget, no first uploads that keep the card over it 2026-11-29 04:26:49 +00:00
github-bot force-pushed github-bot/gh-1944 from f3f670691b to 6c05445626 2026-11-29 04:26:50 +00:00 Compare
github-bot changed title from 8 GB cards: past the budget, no first uploads that keep the card over it to 8 GB cards: no first uploads past the budget, render targets resident first 2026-11-29 05:57:10 +00:00
Measured on the RTX 4060 Ti 8 GB at the same places, 7 to 9 minutes a run: with every priority normal, the card a few hundred MB past its budget had Windows page render targets out too, 181 ms of GPU a frame and 3.4 fps; with them at high priority, 2.3 ms and 14.9 fps, the picture unchanged. A hint only, and a card under its budget pages nothing. VICTORY_RESIDENCY_PRIORITY=0 gives them normal priority, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
Author
Owner

@⁠kraiy404 on GitHub · 2026-11-29 06:35 UTC · original

Tested on the same card you measured on: RTX 4060 Ti 8 GB.

Setup: i5-13400F, 32 GB, Windows 11 26300, driver 621.40.
Series X, 2560x1440 output, DLSS quality, DLSS frame generation 2x, texture room 72%.
Base: 63b902fe1 plus #541 (UI) and the key-mouse commits, then your PR cherry-picked on top
(it applies with two conflicts in resource.rs and host.rs; see the porting note at the end).

Before (same build, same place, without your PR):

  • out of VRAM warnings from Streamline: 8 to 5,206 in a session
  • frame generation sat at "12 presents with it on, 0 frames shown": on, generating nothing
  • the room line read "7290 MB in use ... = 7892 MB" against a 6.75 GB budget
  • 10-14 fps at 6.5k-8k draws
    
    After:
  • out of VRAM: 0 in a 5 minute run
  • frame generation: "12 presents with it on, 0 off, 24 frames shown"
  • room line: "6518 MB in use - 427 MB free in texture blocks ... = 6091 MB", inside the budget
  • 11.6-12.3 fps at ~9,000 draws (average 12.0), CPU prepare 34-45 ms
  • nvidia-smi 7,381 MB of 8,188; the log confirms the priority was given:
    "render targets, depth and memory shaders write: high residency priority (VICTORY_RESIDENCY_PRIORITY=1)"
    
    Porting note, in case it helps the branch: onto that older base your commit needs three symbols that
    base does not have yet.
  • host.rs: with_copy_queue_sync uses ASIDE, but on that base ASIDE is a function-local static inside
    mapped(). I gave the sync path its own static (ASIDE_SYNC) rather than hoisting mapped()'s.
  • resource.rs: texture_budget_limit() was missing; I copied it as is.
  • pool.rs: texture_widest_free() has no per-block ranges on that base, so I stood it in with the total
    free bytes of the texture blocks - more permissive than yours, and only read by the first-upload check.
    
    From my side: this is the first build on this card where frame generation actually produces frames
    with the budget respected. It feels much better to play than any build I have had so far.
**@⁠kraiy404** on GitHub · 2026-11-29 06:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7251946087) Tested on the same card you measured on: RTX 4060 Ti 8 GB.  Setup: i5-13400F, 32 GB, Windows 11 26300, driver 621.40. Series X, 2560x1440 output, DLSS quality, DLSS frame generation 2x, texture room 72%. Base: 63b902fe1 plus #541 (UI) and the key-mouse commits, then your PR cherry-picked on top (it applies with two conflicts in resource.rs and host.rs; see the porting note at the end).  Before (same build, same place, without your PR): - out of VRAM warnings from Streamline: 8 to 5,206 in a session - frame generation sat at "12 presents with it on, 0 frames shown": on, generating nothing - the room line read "7290 MB in use ... = 7892 MB" against a 6.75 GB budget - 10-14 fps at 6.5k-8k draws  After: - out of VRAM: 0 in a 5 minute run - frame generation: "12 presents with it on, 0 off, 24 frames shown" - room line: "6518 MB in use - 427 MB free in texture blocks ... = 6091 MB", inside the budget - 11.6-12.3 fps at ~9,000 draws (average 12.0), CPU prepare 34-45 ms - nvidia-smi 7,381 MB of 8,188; the log confirms the priority was given: "render targets, depth and memory shaders write: high residency priority (VICTORY_RESIDENCY_PRIORITY=1)"  Porting note, in case it helps the branch: onto that older base your commit needs three symbols that base does not have yet. - host.rs: with_copy_queue_sync uses ASIDE, but on that base ASIDE is a function-local static inside mapped(). I gave the sync path its own static (ASIDE_SYNC) rather than hoisting mapped()'s. - resource.rs: texture_budget_limit() was missing; I copied it as is. - pool.rs: texture_widest_free() has no per-block ranges on that base, so I stood it in with the total free bytes of the texture blocks - more permissive than yours, and only read by the first-upload check.  From my side: this is the first build on this card where frame generation actually produces frames with the budget respected. It feels much better to play than any build I have had so far.
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 07:03 UTC · original

Thank you for testing on the same card, and for the porting notes, they are useful. It is good to see a second RTX 4060 Ti 8 GB with a different CPU (i5-13400F) land on the same result. The frame generation result is new to me: in my runs frame generation was the first thing to push the card past its budget, so I had left it off. If you don't mind, I'd like to add your numbers, with credit, to the "How it was tested" section.

One note: the build you tested still had the residency priority as opt-in (VICTORY_RESIDENCY_PRIORITY=1). It is on by default now, and =0 turns it off.

**@⁠RomanFama592** on GitHub · 2026-11-29 07:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7252228796) Thank you for testing on the same card, and for the porting notes, they are useful. It is good to see a second RTX 4060 Ti 8 GB with a different CPU (i5-13400F) land on the same result. The frame generation result is new to me: in my runs frame generation was the first thing to push the card past its budget, so I had left it off. If you don't mind, I'd like to add your numbers, with credit, to the "How it was tested" section. One note: the build you tested still had the residency priority as opt-in (`VICTORY_RESIDENCY_PRIORITY=1`). It is on by default now, and `=0` turns it off.
Author
Owner

@⁠Roybill203 on GitHub · 2026-11-29 07:17 UTC · original

Tested on an RTX 4060 Laptop 8 GB (7,188 MB DXGI budget, Ryzen 9 7945HX, 15.7 GB RAM, driver 621.24, Windows 11 build 26300). Built from main @ 568c5e5 plus this PR applied cleanly (all 4 files). Your docs/8gb-cards.md is the most useful document I have read on this problem — the table of fps against how far past the budget the card sits predicts what we saw before we had a fix.

What this PR fixed for us

The OOM loop is gone. Before it, --series-s --dlss performance produced 13,461 no shared buffer refusals of 6,291,456 bytes in 8 seconds, and the run never got past the loading screen. After it, the same profile produced 1 to 3 OOM lines in total and reached the world at frame 29,533. Nothing that looked like your two cases recurs.

What is left on our card, and it is not memory

The runs now stop differently. The last one (Series X, DLSS balanced, VICTORY_RESIDENCY_PRIORITY=1, VICTORY_VRAM_ADMIT=1 at 92/84 — the gate is ours, see below) shows:

06:12:04  launcher start
06:12:14 .. 06:12:54   loading screens, 345-1000 fps, 4-10 draws
06:13:06  13.7 fps, 73.1 ms, 79 draws          <- first world frames
06:13:06  frame times: 128 frames, median 1.0 ms, p95 3.4,
          p99 55.1, longest 9155.2; 2 over 50 ms, 1 over 100 ms
06:13:08  no unordered-access buffer (0x887A0005) size=48
06:13:08  no upload buffer (0x887A0005) size=8388608
06:13:08  ERROR ... device removed

So 0x8007000E is followed by 0x887A0005 DXGI_ERROR_DEVICE_REMOVED. The whole run is 64 seconds and the longest frame is 9,155 ms, so this is not the 60 s TdrDelay firing; the system log carries no Display or nvlddmkm event for it either. The 9 s frame is the thing that stands out, and it lands while mesh pipelines are still being made:

06:13:06.206779  host mesh pipeline shaders=[mesh b7a81f5b96f4ca93, pixel 43e24028d4a1faef-mask]
06:13:06.206824  host mesh pipeline shaders=[mesh b7a81f5b96f4ca93, pixel ee78da6862364ddd-mask]
06:13:06.207071  host mesh pipeline shaders=[mesh 59874b28fd64363d, pixel ee78da6862364ddd-mask]

The residency priority A/B did not reproduce for us

This is the part I would most like your reading on. Your table has VICTORY_RESIDENCY_PRIORITY=0 at 3.4 fps / 181 ms and the default (on) at 14.9 fps / 2.3 ms. On our card the switch removed every OOM and then ended the run with DEVICE_REMOVED 2 seconds into the world:

our run profile priority OOM lines outcome
#1944 only Series X, DLSS balanced =1 1 0x8007000E, frame 31,336
#1944 only Series S, renderer 6 =1 1 0x8007000E, frame 35,120
#1944 only Series S, DLSS performance =1 3 0x8007000E, frame 30,306
#1944 + priority Series X, DLSS balanced =1 0 0x887A0005, 64 s, longest frame 9,155 ms
#1944 + priority Series S, renderer 6 =1 8 0x8007000E + DEVICE_REMOVED, frame 27,858

The one that gave the expected 0 OOM is also the one that died with DEVICE_REMOVED, and it died sooner in wall-clock terms (64 s against about 12 minutes). My guess, offered as a guess: with every render target, depth and UAV at HIGH, the textures are what Windows pages, and our 15.7 GB of RAM gives the pager less to work with than the 64 GB in your test rig — your doc says the card stays 150-780 MB over after the change, and paying for that out of system memory is what the 9 s frame might be. If you have a run on a 16 GB host I would very much like to see whether the p99 tail looks like ours.

Two things that may be worth knowing

VICTORY_RESIDENCY_PRIORITY is off by default in the code as merged, though the PR text says "on by default". host.rs:

/// (`VICTORY_RESIDENCY_PRIORITY=1`; off by default: all of it normal, as
/// before). ... Off by default until runs on such a card have compared it
/// (docs/8gb-cards.md).
fn residency_priority_on() -> bool {
    *ON.get_or_init(|| std::env::var_os("VICTORY_RESIDENCY_PRIORITY").is_some_and(|v| v == "1"))
}

So anyone reading the PR and expecting the A/B by default will silently get =0. Either the comment or the description wants updating.

The one-byte case looks like it is still reachable through a path this PR does not see. Our runs still log first-upload admissions while the card is at the line, up to so_far=3,750:

a first host texture was admitted just over the room line (black face fix)
  so_far=3500 slot=61921 bytes=409...
a first host texture was admitted just over the room line (black face fix)
  so_far=3750 slot=331961 bytes=40...
ERROR: a host command list did not close (0x8007000E)

#1677's author named the same family as "Defect 3, the stale memory snapshot across a texture pass" — the decision reads numbers taken before the pass, so late-pass admissions ride stale ones. That matches what we see: refusing and climbing at the same time.

What we ran, for anyone reproducing

victory.exe play --res 1080to1440 --dlss balanced --fps 1000 \
  --set VICTORY_RESIDENCY_PRIORITY=1 \
  --set VICTORY_VRAM_ADMIT=1 \
  --set VICTORY_VRAM_ADMIT_HIGH_PERCENT=92 \
  --set VICTORY_VRAM_ADMIT_LOW_PERCENT=84

VICTORY_VRAM_ADMIT and the two percentages are our own addition, not yours: a residency gate on the card's LOCAL segment through IDXGIAdapter3, high/low marks with hysteresis, that withholds speculative uploads only. Our first version gated the drawing path too, and that was a mistake worth recording — the gate fired once at 92 % (used 6,402 of 6,956 MB) and never cleared, because refusing an upload the title is drawing with frees nothing; within 50 s the queue reached 16,098 due with the oldest 1,648 frames old and interiors lost their lighting. With it moved to speculative work only, the queue ends at 145-1,573 due and the picture is clean. It is not what stops your OOM though — sampling once a second cannot see a 2 GB step inside one frame, which is the same stale-snapshot shape as Defect 3.

Logs are 3-7 MB each and I can attach any of them or put them in a gist.


Log analysis done with an assistant; the runs and the numbers are mine.

**@⁠Roybill203** on GitHub · 2026-11-29 07:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7252385169) Tested on an RTX 4060 Laptop 8 GB (7,188 MB DXGI budget, Ryzen 9 7945HX, 15.7 GB RAM, driver 621.24, Windows 11 build 26300). Built from `main` @ `568c5e5` plus this PR applied cleanly (all 4 files). Your `docs/8gb-cards.md` is the most useful document I have read on this problem — the table of fps against how far past the budget the card sits predicts what we saw before we had a fix. ## What this PR fixed for us **The OOM loop is gone.** Before it, `--series-s --dlss performance` produced 13,461 `no shared buffer` refusals of 6,291,456 bytes in 8 seconds, and the run never got past the loading screen. After it, the same profile produced **1 to 3 OOM lines in total** and reached the world at frame 29,533. Nothing that looked like your two cases recurs. ## What is left on our card, and it is not memory The runs now stop differently. The last one (Series X, DLSS balanced, `VICTORY_RESIDENCY_PRIORITY=1`, `VICTORY_VRAM_ADMIT=1` at 92/84 — the gate is ours, see below) shows: ``` 06:12:04 launcher start 06:12:14 .. 06:12:54 loading screens, 345-1000 fps, 4-10 draws 06:13:06 13.7 fps, 73.1 ms, 79 draws <- first world frames 06:13:06 frame times: 128 frames, median 1.0 ms, p95 3.4, p99 55.1, longest 9155.2; 2 over 50 ms, 1 over 100 ms 06:13:08 no unordered-access buffer (0x887A0005) size=48 06:13:08 no upload buffer (0x887A0005) size=8388608 06:13:08 ERROR ... device removed ``` So `0x8007000E` is followed by `0x887A0005` `DXGI_ERROR_DEVICE_REMOVED`. The whole run is **64 seconds** and the longest frame is **9,155 ms**, so this is not the 60 s `TdrDelay` firing; the system log carries no Display or nvlddmkm event for it either. The 9 s frame is the thing that stands out, and it lands while mesh pipelines are still being made: ``` 06:13:06.206779 host mesh pipeline shaders=[mesh b7a81f5b96f4ca93, pixel 43e24028d4a1faef-mask] 06:13:06.206824 host mesh pipeline shaders=[mesh b7a81f5b96f4ca93, pixel ee78da6862364ddd-mask] 06:13:06.207071 host mesh pipeline shaders=[mesh 59874b28fd64363d, pixel ee78da6862364ddd-mask] ``` ## The residency priority A/B did not reproduce for us This is the part I would most like your reading on. Your table has `VICTORY_RESIDENCY_PRIORITY=0` at 3.4 fps / 181 ms and the default (on) at 14.9 fps / 2.3 ms. On our card the switch **removed every OOM and then ended the run with `DEVICE_REMOVED` 2 seconds into the world**: | our run | profile | priority | OOM lines | outcome | |---|---|---|---|---| | `#1944` only | Series X, DLSS balanced | `=1` | 1 | `0x8007000E`, frame 31,336 | | `#1944` only | Series S, renderer 6 | `=1` | 1 | `0x8007000E`, frame 35,120 | | `#1944` only | Series S, DLSS performance | `=1` | 3 | `0x8007000E`, frame 30,306 | | **`#1944` + priority** | **Series X, DLSS balanced** | **`=1`** | **0** | **`0x887A0005`, 64 s, longest frame 9,155 ms** | | `#1944` + priority | Series S, renderer 6 | `=1` | 8 | `0x8007000E` + `DEVICE_REMOVED`, frame 27,858 | The one that gave the expected 0 OOM is also the one that died with `DEVICE_REMOVED`, and it died sooner in wall-clock terms (64 s against about 12 minutes). My guess, offered as a guess: with every render target, depth and UAV at `HIGH`, the textures are what Windows pages, and our 15.7 GB of RAM gives the pager less to work with than the 64 GB in your test rig — your doc says the card stays 150-780 MB over after the change, and paying for that out of system memory is what the 9 s frame might be. If you have a run on a 16 GB host I would very much like to see whether the p99 tail looks like ours. ## Two things that may be worth knowing **`VICTORY_RESIDENCY_PRIORITY` is off by default in the code as merged**, though the PR text says "on by default". `host.rs`: ```rust /// (`VICTORY_RESIDENCY_PRIORITY=1`; off by default: all of it normal, as /// before). ... Off by default until runs on such a card have compared it /// (docs/8gb-cards.md). fn residency_priority_on() -> bool { *ON.get_or_init(|| std::env::var_os("VICTORY_RESIDENCY_PRIORITY").is_some_and(|v| v == "1")) } ``` So anyone reading the PR and expecting the A/B by default will silently get `=0`. Either the comment or the description wants updating. **The one-byte case looks like it is still reachable through a path this PR does not see.** Our runs still log first-upload admissions while the card is at the line, up to `so_far=3,750`: ``` a first host texture was admitted just over the room line (black face fix) so_far=3500 slot=61921 bytes=409... a first host texture was admitted just over the room line (black face fix) so_far=3750 slot=331961 bytes=40... ERROR: a host command list did not close (0x8007000E) ``` `#1677`'s author named the same family as "Defect 3, the stale `memory` snapshot across a texture pass" — the decision reads numbers taken before the pass, so late-pass admissions ride stale ones. That matches what we see: refusing and climbing at the same time. ## What we ran, for anyone reproducing ``` victory.exe play --res 1080to1440 --dlss balanced --fps 1000 \ --set VICTORY_RESIDENCY_PRIORITY=1 \ --set VICTORY_VRAM_ADMIT=1 \ --set VICTORY_VRAM_ADMIT_HIGH_PERCENT=92 \ --set VICTORY_VRAM_ADMIT_LOW_PERCENT=84 ``` `VICTORY_VRAM_ADMIT` and the two percentages are our own addition, not yours: a residency gate on the card's LOCAL segment through `IDXGIAdapter3`, high/low marks with hysteresis, that withholds **speculative** uploads only. Our first version gated the drawing path too, and that was a mistake worth recording — the gate fired once at 92 % (used 6,402 of 6,956 MB) and never cleared, because refusing an upload the title is drawing with frees nothing; within 50 s the queue reached 16,098 due with the oldest 1,648 frames old and interiors lost their lighting. With it moved to speculative work only, the queue ends at 145-1,573 due and the picture is clean. It is not what stops your OOM though — sampling once a second cannot see a 2 GB step inside one frame, which is the same stale-snapshot shape as Defect 3. Logs are 3-7 MB each and I can attach any of them or put them in a gist. --- *Log analysis done with an assistant; the runs and the numbers are mine.*
Author
Owner

@⁠kraiy404 on GitHub · 2026-11-29 07:25 UTC · original

Thank you for testing on the same card, and for the porting notes, they are useful. It is good to see a second RTX 4060 Ti 8 GB with a different CPU (i5-13400F) land on the same result. The frame generation result is new to me: in my runs frame generation was the first thing to push the card past its budget, so I had left it off. If you don't mind, I'd like to add your numbers, with credit, to the "How it was tested" section.

One note: the build you tested still had the residency priority as opt-in (). It is on by default now, and turns it off.VICTORY_RESIDENCY_PRIORITY=1``=0

Sure, go ahead - credit is fine.

On frame generation: with the first-upload guard in place it works at 72% texture room,
and it was the difference between "on but generating nothing" and "24 frames shown".

One data point that may matter to you: on the official latest main (568c5e5) with the
same PR, frame generation still fails there - but not because of your guard. That base
counts the budget lower (6,922 MB where the driver reports 7,181), so the 72% line falls
to 4,993 MB and the card sits ~1 GB over it permanently. On 63b902fe1 the same settings
sit inside the budget. So the newer base's budget arithmetic is worth a look.

**@⁠kraiy404** on GitHub · 2026-11-29 07:25 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7252459656) > Thank you for testing on the same card, and for the porting notes, they are useful. It is good to see a second RTX 4060 Ti 8 GB with a different CPU (i5-13400F) land on the same result. The frame generation result is new to me: in my runs frame generation was the first thing to push the card past its budget, so I had left it off. If you don't mind, I'd like to add your numbers, with credit, to the "How it was tested" section. > > One note: the build you tested still had the residency priority as opt-in (). It is on by default now, and turns it off.`VICTORY_RESIDENCY_PRIORITY=1``=0` Sure, go ahead - credit is fine. On frame generation: with the first-upload guard in place it works at 72% texture room, and it was the difference between "on but generating nothing" and "24 frames shown". One data point that may matter to you: on the official latest main (568c5e5) with the same PR, frame generation still fails there - but not because of your guard. That base counts the budget lower (6,922 MB where the driver reports 7,181), so the 72% line falls to 4,993 MB and the card sits ~1 GB over it permanently. On 63b902fe1 the same settings sit inside the budget. So the newer base's budget arithmetic is worth a look.
With render targets held at high residency priority, what Windows pages
past the card's budget is mostly textures, into the PC's memory. On a
laptop with an RTX 4060 8 GB and 16 GB of RAM the priority took away every
out-of-memory error and then the device was removed after a 9 s frame
(reported in #1944). Until that is understood, a PC with less than 24 GiB
(a 32 GB one is in) keeps normal priority and the log says so once;
VICTORY_RESIDENCY_PRIORITY=1 turns it on anyway, =0 off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 09:25 UTC · original

Thank you for the careful runs and the write-up, it is the first test of this on a laptop and on 16 GB of RAM.

You are right that the code you built had the residency priority off by default: that was the first revision of this PR. A later commit turned it on by default, and the PR text was written for that one. Your result made me change it again: the priority is now on by default only on a PC with 24 GiB of RAM or more, and stays off on yours unless VICTORY_RESIDENCY_PRIORITY=1 is set. The log says so once at the start. My runs were all on 64 GB, so I have nothing to show for a 16 GB host yet, and your guess (with render targets held, the textures are what gets paged, and 16 GB leaves the pager little room) is the most likely reading I have too.

If you have time for one more pair on the current head, the most useful would be without VICTORY_VRAM_ADMIT, so the two changes are not mixed: the default (now off on your laptop) and --set VICTORY_RESIDENCY_PRIORITY=1, same profile and route. The play log of the DEVICE_REMOVED one would help most; a gist is fine.

On the late admissions over the room line: that is the black-face fix's "just over the line" path, which this PR does not narrow under the budget, and #1677's stale-snapshot defect is a good explanation of refusing and climbing at once. I'd rather leave it to that PR than widen this one.

**@⁠RomanFama592** on GitHub · 2026-11-29 09:25 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7253754795) Thank you for the careful runs and the write-up, it is the first test of this on a laptop and on 16 GB of RAM. You are right that the code you built had the residency priority off by default: that was the first revision of this PR. A later commit turned it on by default, and the PR text was written for that one. Your result made me change it again: the priority is now on by default only on a PC with 24 GiB of RAM or more, and stays off on yours unless `VICTORY_RESIDENCY_PRIORITY=1` is set. The log says so once at the start. My runs were all on 64 GB, so I have nothing to show for a 16 GB host yet, and your guess (with render targets held, the textures are what gets paged, and 16 GB leaves the pager little room) is the most likely reading I have too. If you have time for one more pair on the current head, the most useful would be without `VICTORY_VRAM_ADMIT`, so the two changes are not mixed: the default (now off on your laptop) and `--set VICTORY_RESIDENCY_PRIORITY=1`, same profile and route. The play log of the `DEVICE_REMOVED` one would help most; a gist is fine. On the late admissions over the room line: that is the black-face fix's "just over the line" path, which this PR does not narrow under the budget, and #1677's stale-snapshot defect is a good explanation of refusing and climbing at once. I'd rather leave it to that PR than widen this one.
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 09:31 UTC · original

Thanks, added to "How it was tested", with credit.

On the budget: with the same base (568c5e5 plus this PR) my card reports a budget of about 7,180 MB, so I don't see the 6,922 here. DXGI's budget is what the OS leaves the process, and it falls when other programs hold video memory (browsers, overlays, a second game window), so a ~260 MB difference between runs or machines can come from that rather than from the base's arithmetic. If you see 6,922 again, the log's the texture queue's room ... budget of N MB line and what else was open at the time would tell the two apart.

**@⁠RomanFama592** on GitHub · 2026-11-29 09:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7253823506) Thanks, added to "How it was tested", with credit. On the budget: with the same base (568c5e5 plus this PR) my card reports a budget of about 7,180 MB, so I don't see the 6,922 here. DXGI's budget is what the OS leaves the process, and it falls when other programs hold video memory (browsers, overlays, a second game window), so a ~260 MB difference between runs or machines can come from that rather than from the base's arithmetic. If you see 6,922 again, the log's `the texture queue's room ... budget of N MB` line and what else was open at the time would tell the two apart.
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 09:37 UTC · original

Status update

  • The branch is merged with current main (including #1771, #1888 and #1763), and the residency priority is now on by default only with 24 GiB of RAM or more (see the reply above). Tests pass on the merged head.
  • Why no new numbers yet: an unattended overnight run (two rounds of the same seven builds) showed that the second round was slower for every build, the base included, by up to 3x. The in-game time of day turned out to matter a lot on this card: the same spot ran at about 16 fps at night and about 6 fps at noon, with GPU time going from about 55 to 156 ms as the card went further past its budget. Comparisons taken at different in-game hours are not comparable, so I'm not posting those.
  • Next: the same runs with the world clock held at a fixed hour from the start (the existing VICTORY_IMAGE_HOLD), so every build sees the same scene. Then the before/after for this PR on the merged base, and the results for #1968 and #1926 on this card.
  • Also queued: the A-D matrix from #1962 on plain main with this 8 GB card, as asked there.

CPU-side work for two-die Ryzens (the idea from #730) will go in a separate PR, so this one stays about 8 GB cards.

**@⁠RomanFama592** on GitHub · 2026-11-29 09:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7253889605) **Status update** - The branch is merged with current `main` (including #1771, #1888 and #1763), and the residency priority is now on by default only with 24 GiB of RAM or more (see the reply above). Tests pass on the merged head. - **Why no new numbers yet:** an unattended overnight run (two rounds of the same seven builds) showed that the second round was slower for every build, the base included, by up to 3x. The in-game time of day turned out to matter a lot on this card: the same spot ran at about 16 fps at night and about 6 fps at noon, with GPU time going from about 55 to 156 ms as the card went further past its budget. Comparisons taken at different in-game hours are not comparable, so I'm not posting those. - **Next:** the same runs with the world clock held at a fixed hour from the start (the existing `VICTORY_IMAGE_HOLD`), so every build sees the same scene. Then the before/after for this PR on the merged base, and the results for #1968 and #1926 on this card. - **Also queued:** the A-D matrix from #1962 on plain `main` with this 8 GB card, as asked there. CPU-side work for two-die Ryzens (the idea from #730) will go in a separate PR, so this one stays about 8 GB cards.
Author
Owner

@⁠Roybill203 on GitHub · 2026-11-29 10:30 UTC · original

Read the status update — the in-game time of day result explains a lot of what confused us, so thank you for writing it down before posting numbers. We had been comparing runs at different hours without knowing it.

The pair you asked for

We have the settings in place and will run it tonight: Series X, DLSS balanced, --res 1080to1440, frame generation off, no VICTORY_VRAM_ADMIT, same route both times.

  • A — nothing set. VICTORY_RESIDENCY_PRIORITY reads 0 on our laptop, as you say it now should below 24 GiB.
  • B — --set VICTORY_RESIDENCY_PRIORITY=1.

We will also try to hold the world clock so the two are comparable at all; our runs so far were not, which is exactly the defect you found. If VICTORY_IMAGE_HOLD takes an hour we will use the same one for both and say which.

What we already have, which may be the same thing you are looking for

Three runs on 568c5e5 + this PR, all with VICTORY_VRAM_ADMIT=1 (ours, so not the clean pair — read them as a first look only):

profile priority OOM lines outcome
Series X, DLSS balanced =1 0 0x887A0005 DEVICE_REMOVED, 64 s, longest frame 9,155 ms
Series S, renderer 6 =1 8 0x8007000E then DEVICE_REMOVED, frame 27,858
Series X, DLSS balanced =1 1 0x8007000E, frame 31,336

The first row is the one whose log you asked for. It is 2.05 MB. The sequence at the end, in order:

06:12:54  loading screens end, ~1000 fps, 10 draws
06:13:06  13.7 fps, 73.1 ms, 79 draws                  <- first world frames
06:13:06  frame times: 128 frames, median 1.0 ms, p95 3.4,
          p99 55.1, longest 9155.2; 2 over 50 ms, 1 over 100 ms
06:13:08  a texture to buffer copy (a read back) copies=9  made=Ok(())
06:13:08  a texture to buffer copy (a read back) copies=10 made=Ok(())
06:13:08  depth texture with unordered access (lazy twin) ...
06:13:08  no unordered-access buffer (0x887A0005) size=48
06:13:08  no upload buffer (0x887A0005) size=8388608
06:13:08  no host list for a prelude (0x887A0005)
06:13:08  ERROR ... device removed

Two things we would like your reading on, since you have the card and the counters:

The 9,155 ms frame is not TdrDelay. Our TdrDelay is 60 s and the whole run is 64 s, and the Windows System log carries no Display or nvlddmkm event around 06:13:08. So whatever removes the device here is not a timeout we can raise. The frames just before it are the first ones that actually draw the world (79 draws), which is also where your #1962 reporter sees his failures — different error, same moment.

The read-backs immediately before the removal. Two texture to buffer copy (a read back) of 5x1 f2 and 1x1 f2 complete with Ok(()), and then the device goes. #802's reporter independently noticed the same shape in his prologue crashes ("the last thing before the crash is a read back of tiny textures ... sources 5x1 f2 and 1x1 f2, copies=1..6 — runs that survive it complete 8+8 of these"). Ours stops at 9 and 10. If those two numbers mean anything to you, that may be a more useful thread to pull than the priority switch.

On the budget difference

You are right that it is DXGI and not arithmetic — we had Chromium and the harness open on the runs that showed 6,922. The last clean run reports 6,984-7,006 MB with nothing else open, which matches your ~7,180 within what other processes take.

Two notes that may save someone else a night

VICTORY_RESIDENCY_PRIORITY was off by default in the code as we pulled it, while the PR text said "on by default". Your 24 GiB rule is a good resolution and we have nothing to add to it, only to say that anyone reading the earlier text would have silently measured =0.

#1962 looks like the same wall from the other side. That reporter is on an RTX 5060 8 GB / 16 GB RAM, Series S + DLSS performance, and gets 0x8007000E at world entry in 4 of 4 runs on 568c5e5, having tried room 80/90, DROP_MIPS 1/2 and a 2,560 MB texture budget — none of it stops it, because as he puts it "the non-texture side fills the rest of an 8 GB card". He also reports 8fc2254 runs a long session at 9.1-9.6 fps on the same PC. If both of you are right, the regression between 8fc2254 and 568c5e5 may matter more than either 8 GB PR — and it would explain why our own numbers across those two bases moved as much as they did.

Logs: I can attach the three files here (2.0, 2.0 and 2.1 MB) or put them in a gist — say which you prefer and I will do that rather than attach them unasked.


Log analysis done with an assistant; the runs and the numbers are mine.

**@⁠Roybill203** on GitHub · 2026-11-29 10:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7254479743) Read the status update — the in-game time of day result explains a lot of what confused us, so thank you for writing it down before posting numbers. We had been comparing runs at different hours without knowing it. ## The pair you asked for We have the settings in place and will run it tonight: Series X, DLSS balanced, `--res 1080to1440`, frame generation off, **no `VICTORY_VRAM_ADMIT`**, same route both times. - **A** — nothing set. `VICTORY_RESIDENCY_PRIORITY` reads 0 on our laptop, as you say it now should below 24 GiB. - **B** — `--set VICTORY_RESIDENCY_PRIORITY=1`. We will also try to hold the world clock so the two are comparable at all; our runs so far were not, which is exactly the defect you found. If `VICTORY_IMAGE_HOLD` takes an hour we will use the same one for both and say which. ## What we already have, which may be the same thing you are looking for Three runs on `568c5e5` + this PR, **all with `VICTORY_VRAM_ADMIT=1`** (ours, so not the clean pair — read them as a first look only): | profile | priority | OOM lines | outcome | |---|---|---|---| | Series X, DLSS balanced | `=1` | **0** | **`0x887A0005` DEVICE_REMOVED**, 64 s, longest frame 9,155 ms | | Series S, renderer 6 | `=1` | 8 | `0x8007000E` then `DEVICE_REMOVED`, frame 27,858 | | Series X, DLSS balanced | `=1` | 1 | `0x8007000E`, frame 31,336 | The first row is the one whose log you asked for. It is 2.05 MB. The sequence at the end, in order: ``` 06:12:54 loading screens end, ~1000 fps, 10 draws 06:13:06 13.7 fps, 73.1 ms, 79 draws <- first world frames 06:13:06 frame times: 128 frames, median 1.0 ms, p95 3.4, p99 55.1, longest 9155.2; 2 over 50 ms, 1 over 100 ms 06:13:08 a texture to buffer copy (a read back) copies=9 made=Ok(()) 06:13:08 a texture to buffer copy (a read back) copies=10 made=Ok(()) 06:13:08 depth texture with unordered access (lazy twin) ... 06:13:08 no unordered-access buffer (0x887A0005) size=48 06:13:08 no upload buffer (0x887A0005) size=8388608 06:13:08 no host list for a prelude (0x887A0005) 06:13:08 ERROR ... device removed ``` Two things we would like your reading on, since you have the card and the counters: **The 9,155 ms frame is not `TdrDelay`.** Our `TdrDelay` is 60 s and the whole run is 64 s, and the Windows System log carries no Display or nvlddmkm event around 06:13:08. So whatever removes the device here is not a timeout we can raise. The frames just before it are the first ones that actually draw the world (79 draws), which is also where your `#1962` reporter sees his failures — different error, same moment. **The read-backs immediately before the removal.** Two `texture to buffer copy (a read back)` of `5x1 f2` and `1x1 f2` complete with `Ok(())`, and then the device goes. `#802`'s reporter independently noticed the same shape in his prologue crashes ("the last thing before the crash is a read back of tiny textures ... sources 5x1 f2 and 1x1 f2, copies=1..6 — runs that survive it complete 8+8 of these"). Ours stops at 9 and 10. If those two numbers mean anything to you, that may be a more useful thread to pull than the priority switch. ## On the budget difference You are right that it is DXGI and not arithmetic — we had Chromium and the harness open on the runs that showed 6,922. The last clean run reports 6,984-7,006 MB with nothing else open, which matches your ~7,180 within what other processes take. ## Two notes that may save someone else a night **`VICTORY_RESIDENCY_PRIORITY` was off by default in the code as we pulled it**, while the PR text said "on by default". Your 24 GiB rule is a good resolution and we have nothing to add to it, only to say that anyone reading the earlier text would have silently measured `=0`. **`#1962` looks like the same wall from the other side.** That reporter is on an RTX 5060 8 GB / 16 GB RAM, Series S + DLSS performance, and gets `0x8007000E` at world entry in 4 of 4 runs on `568c5e5`, having tried room 80/90, DROP_MIPS 1/2 and a 2,560 MB texture budget — none of it stops it, because as he puts it "the non-texture side fills the rest of an 8 GB card". He also reports `8fc2254` runs a long session at 9.1-9.6 fps on the same PC. If both of you are right, the regression between `8fc2254` and `568c5e5` may matter more than either 8 GB PR — and it would explain why our own numbers across those two bases moved as much as they did. Logs: I can attach the three files here (2.0, 2.0 and 2.1 MB) or put them in a gist — say which you prefer and I will do that rather than attach them unasked. --- *Log analysis done with an assistant; the runs and the numbers are mine.*
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 11:09 UTC · original

Thanks — a gist is best for logs that size.

On the read-backs: they look routine here. The same pair (5x1 f2 then 1x1 f2, 80 and 16 bytes) shows up in every one of my healthy runs on this card, about one pair a second from world entry (16–18 in an eight-minute run), so I read them as the title's regular small read-back rather than a trigger; in your log they are simply the last work submitted before the removal. What would say more is what the GPU was doing in that 9 s frame: the on the GPU / waits for GPU figures on the lines just before it, and the video memory as the system counts it lines, would show whether the card was paging into a 16 GB host.

On the clock: VICTORY_IMAGE_HOLD needs the offsets of the world clock's two words for your build, which I found with a memory scan. In my runs I set and hold the clock only once the world is loaded. I saw start-up failures when holding from launch, but those turned out to be the v2026.11.29.01 start regression (#2081 and others), so I can't say holding from launch is unsafe. Any fixed hour works as long as both runs use the same one; noon was much heavier on this card than night.

On #1962: agreed, the regression between 8fc2254 and 568c5e5 may matter more than either 8 GB PR. I'm going to run the matrix kalberts0089-hash posted there on this card.

**@⁠RomanFama592** on GitHub · 2026-11-29 11:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7254921696) Thanks — a gist is best for logs that size. **On the read-backs:** they look routine here. The same pair (`5x1 f2` then `1x1 f2`, 80 and 16 bytes) shows up in every one of my healthy runs on this card, about one pair a second from world entry (16–18 in an eight-minute run), so I read them as the title's regular small read-back rather than a trigger; in your log they are simply the last work submitted before the removal. What would say more is what the GPU was doing in that 9 s frame: the `on the GPU` / `waits for GPU` figures on the lines just before it, and the `video memory as the system counts it` lines, would show whether the card was paging into a 16 GB host. **On the clock:** `VICTORY_IMAGE_HOLD` needs the offsets of the world clock's two words for your build, which I found with a memory scan. In my runs I set and hold the clock only once the world is loaded. I saw start-up failures when holding from launch, but those turned out to be the v2026.11.29.01 start regression (#2081 and others), so I can't say holding from launch is unsafe. Any fixed hour works as long as both runs use the same one; noon was much heavier on this card than night. **On #1962:** agreed, the regression between `8fc2254` and `568c5e5` may matter more than either 8 GB PR. I'm going to run the matrix kalberts0089-hash posted there on this card.
Author
Owner

@⁠Yuanzer on GitHub · 2026-11-29 17:04 UTC · original

Fixed-clock A/B on the reporter's Windows 11 machine (AI-assisted local runs):

  • i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40.
  • Candidate: current PR head 8efdce32; base: 829188e9.
  • Series S, internal 1280x720 -> output 1920x1080, DLSS Quality preset M, frame generation off, ray tracing off.
  • The world clock was found with #2340's victory-probe (minute img+0xab5cdd4, hour img+0xab5cdd0) and held at 12:00 during both variants.
  • Each run waited for >=500 draws, settled 15 s, then sampled the title's one-second FPS/frame/draw readings for 60 s. Two complete baseline -> PR pairs.
120 samples per build main 829188e9 PR 8efdce32
median FPS 20 20
median frame 48.90 ms 49.15 ms
P90 frame 52.5 ms 52.6 ms
P99 frame 55.8 ms 73.8 ms
median draws 5,365.5 5,429.5
median ms per 1,000 draws 8.983 9.002

The two paired deltas were -0.15 ms and +0.65 ms. The result is neutral within noise, not a frame-time win. Earlier unclocked pairs varied from 15 to 21 FPS and are intentionally not used as evidence.

Each run had the same single textures picked by index: the card has no room for more; they wait line. More importantly for change 2, none of the PR logs contains the expected render targets, depth and memory shaders write: high residency priority line, despite 32 GB RAM and no explicit VICTORY_RESIDENCY_PRIORITY=0. Is that expected on this all-Series-S opening scene, or does it mean the applicable render targets are placed resources that this path does not reach?

This does not disprove the fix for a scene that is actually paging over budget; it shows no measurable benefit in this 720p scene on a 5060 Ti, where the residency hint also did not report applying.

Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.

**@⁠Yuanzer** on GitHub · 2026-11-29 17:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7259398925) Fixed-clock A/B on the reporter's Windows 11 machine (AI-assisted local runs): - i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40. - Candidate: current PR head `8efdce32`; base: `829188e9`. - Series S, internal 1280x720 -> output 1920x1080, DLSS Quality preset M, frame generation off, ray tracing off. - The world clock was found with #2340's `victory-probe` (`minute img+0xab5cdd4`, `hour img+0xab5cdd0`) and held at **12:00** during both variants. - Each run waited for >=500 draws, settled 15 s, then sampled the title's one-second FPS/frame/draw readings for 60 s. Two complete baseline -> PR pairs. | 120 samples per build | main `829188e9` | PR `8efdce32` | |---|---:|---:| | median FPS | 20 | 20 | | median frame | 48.90 ms | 49.15 ms | | P90 frame | 52.5 ms | 52.6 ms | | P99 frame | 55.8 ms | 73.8 ms | | median draws | 5,365.5 | 5,429.5 | | median ms per 1,000 draws | 8.983 | 9.002 | The two paired deltas were -0.15 ms and +0.65 ms. The result is neutral within noise, not a frame-time win. Earlier unclocked pairs varied from 15 to 21 FPS and are intentionally not used as evidence. Each run had the same single `textures picked by index: the card has no room for more; they wait` line. More importantly for change 2, none of the PR logs contains the expected `render targets, depth and memory shaders write: high residency priority` line, despite 32 GB RAM and no explicit `VICTORY_RESIDENCY_PRIORITY=0`. Is that expected on this all-Series-S opening scene, or does it mean the applicable render targets are placed resources that this path does not reach? This does not disprove the fix for a scene that is actually paging over budget; it shows no measurable benefit in this 720p scene on a 5060 Ti, where the residency hint also did not report applying. *Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.*
Author
Owner

@⁠Yuanzer on GitHub · 2026-11-29 18:11 UTC · original · edited 2026-11-29 18:19 UTC

Fixed-clock high-load A/B on the reporter's Windows 11 machine (AI-assisted local runs):

  • i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40.
  • Title 1.0.2.1; Series X, internal 2560x1440, DLSS Quality preset M, frame generation off, ray tracing off.
  • Saved F1 profile temporarily set to Series X and restored afterward; VICTORY_TEXTURE_ROOM_PERCENT=92 for both.
  • World clock held at 12:00 for both runs with #2340's probe.
  • Main: 829188e9. Candidate: current head 8efdce32. Candidate used --set VICTORY_RESIDENCY_PRIORITY=1.
60 one-second samples main #1944
median FPS 18 18
median frame 54.1 ms 56.1 ms
P90 frame 74.3 ms 65.1 ms
P99 frame 80.1 ms 102.9 ms
median draws 5,749 5,837

Both runs were genuinely over budget: main logged 1,194 Streamline Exceeded VRAM budget warnings; the PR logged 1,240. Both had one no-room texture line and one no-free-descriptor line; neither reached OOM or device-removed.

Correction to my first follow-up: the missing 'high residency priority' line was a logging-filter mistake, not a code result. This PowerShell environment had RUST_LOG=warn, which filters the info-level line. I rebuilt a diagnostic copy and reran the same over-budget scene with VICTORY_LOG=victory_gpu::host=info,warn. The log then contained:

render targets, depth and memory shaders write: high residency priority

So the priority path does execute at this workload. A subsequent diagnostic line correctly showed an ineligible buffer (flags=0, default heap) before an eligible resource took the priority. There is no defect to report from the missing line, and I withdraw that part of the previous comment.

The performance result remains one pair: median FPS is neutral, P90 improved while P99 regressed. I am not treating either as proof of a regression or gain. The useful conclusion is that the PR applies in a real over-budget Series X scene without changing the outcome category in this sample.

Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.

**@⁠Yuanzer** on GitHub · 2026-11-29 18:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7260278467) · edited 2026-11-29 18:19 UTC Fixed-clock high-load A/B on the reporter's Windows 11 machine (AI-assisted local runs): - i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40. - Title 1.0.2.1; Series X, internal 2560x1440, DLSS Quality preset M, frame generation off, ray tracing off. - Saved F1 profile temporarily set to Series X and restored afterward; VICTORY_TEXTURE_ROOM_PERCENT=92 for both. - World clock held at 12:00 for both runs with #2340's probe. - Main: 829188e9. Candidate: current head 8efdce32. Candidate used --set VICTORY_RESIDENCY_PRIORITY=1. | 60 one-second samples | main | #1944 | |---|---:|---:| | median FPS | 18 | 18 | | median frame | 54.1 ms | 56.1 ms | | P90 frame | 74.3 ms | 65.1 ms | | P99 frame | 80.1 ms | 102.9 ms | | median draws | 5,749 | 5,837 | Both runs were genuinely over budget: main logged 1,194 Streamline Exceeded VRAM budget warnings; the PR logged 1,240. Both had one no-room texture line and one no-free-descriptor line; neither reached OOM or device-removed. Correction to my first follow-up: the missing 'high residency priority' line was a logging-filter mistake, not a code result. This PowerShell environment had RUST_LOG=warn, which filters the info-level line. I rebuilt a diagnostic copy and reran the same over-budget scene with VICTORY_LOG=victory_gpu::host=info,warn. The log then contained: render targets, depth and memory shaders write: high residency priority So the priority path does execute at this workload. A subsequent diagnostic line correctly showed an ineligible buffer (flags=0, default heap) before an eligible resource took the priority. There is no defect to report from the missing line, and I withdraw that part of the previous comment. The performance result remains one pair: median FPS is neutral, P90 improved while P99 regressed. I am not treating either as proof of a regression or gain. The useful conclusion is that the PR applies in a real over-budget Series X scene without changing the outcome category in this sample. *Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.*
The high residency priority for render targets was given in prioritise(),
to committed resources only. With render-target aliasing on (alias_rt.rs,
the default), the render targets placed in its physical heap chunks kept a
normal priority, so the hint did not reach most of them: a Series S run on
an RTX 5060 Ti 8 GB with 32 GB of RAM never logged the high priority at
all (Yuanzer on #1944). Those chunks hold render targets only, so the heap
itself now gets the high priority (a heap's pieces share it), logged once
as "aliased render targets' heaps: high residency priority". Off with the
same VICTORY_RESIDENCY_PRIORITY=0 and the same RAM rule.

Measured with victory-probe-mod's example plan (#2825: same places, hours
and camera each run), RTX 4060 Ti 8 GB, 64 GB RAM, Series X, DLSS balanced,
two A/B pairs in both orders: neutral here (casa 20:00 14.2/14.2 fps before
vs 13.8/14.4 after; salida_casa 23:00 6.8/6.7 vs 6.8/5.6; avenida 01:00
12.8/13.9 vs 12.5/13.4; avenida 13:00 14.2/15.1 vs 13.7/14.9). A hint
only: it matters where the card pages render targets out, which this PC
with 64 GB did not show at these places.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KLpN7BE6FrjsqTq22kbwy7
Author
Owner

@⁠Yuanzer on GitHub · 2026-11-29 18:31 UTC · original

Isolated priority A/B, same candidate and scene, with run order reversed (AI-assisted local runs):

  • Candidate: 8efdce32.
  • i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40; title 1.0.2.1.
  • Series X, internal 2560x1440, DLSS Quality preset M, frame generation off, ray tracing off, texture room 92%.
  • World clock held at 12:00 in every run.
  • Only VICTORY_RESIDENCY_PRIORITY changed: 0 versus 1. VICTORY_LOG=victory_gpu::host=info,warn was fixed for all four runs so the priority line was visible.
run order priority median ms P90 P99 median draws
off 1 first 0 55.9 60.0 86.3 5,766
on 1 second 1 54.8 65.5 68.2 5,877
on 2 first 1 56.8 60.7 62.8 5,820
off 2 second 0 54.7 65.9 70.5 5,905

Across the two runs per side, median frame was 55.3 ms off versus 55.8 ms on, so median is neutral within this environment. P99 was lower on in both paired runs (by 18.1 ms and 7.7 ms), while P90 followed the run order rather than the switch. Each run logged about 1,207-1,225 Streamline Exceeded VRAM budget warnings, one no-room texture line and one no-free-descriptor line; none reached OOM or device-removed.

The high residency priority line appeared in both ON logs and neither OFF log, confirming the intended switch path. My reading is that this is evidence for a tail-latency benefit of the priority hint, not for bringing the 92% Series X scene inside the budget. The reversal also shows why one pair would have overstated a median gain: the sign of the median delta changed when run order changed.

I can run longer/more repetitions if you want a stronger P99 claim; four runs already show the path applied and no instability in this scene.

Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.

**@⁠Yuanzer** on GitHub · 2026-11-29 18:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7260549790) Isolated priority A/B, same candidate and scene, with run order reversed (AI-assisted local runs): - Candidate: 8efdce32. - i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40; title 1.0.2.1. - Series X, internal 2560x1440, DLSS Quality preset M, frame generation off, ray tracing off, texture room 92%. - World clock held at 12:00 in every run. - Only `VICTORY_RESIDENCY_PRIORITY` changed: 0 versus 1. `VICTORY_LOG=victory_gpu::host=info,warn` was fixed for all four runs so the priority line was visible. | run | order | priority | median ms | P90 | P99 | median draws | |---|---|---:|---:|---:|---:|---:| | off 1 | first | 0 | 55.9 | 60.0 | 86.3 | 5,766 | | on 1 | second | 1 | 54.8 | 65.5 | 68.2 | 5,877 | | on 2 | first | 1 | 56.8 | 60.7 | 62.8 | 5,820 | | off 2 | second | 0 | 54.7 | 65.9 | 70.5 | 5,905 | Across the two runs per side, median frame was 55.3 ms off versus 55.8 ms on, so median is neutral within this environment. P99 was lower on in both paired runs (by 18.1 ms and 7.7 ms), while P90 followed the run order rather than the switch. Each run logged about 1,207-1,225 Streamline `Exceeded VRAM budget` warnings, one no-room texture line and one no-free-descriptor line; none reached OOM or device-removed. The `high residency priority` line appeared in both ON logs and neither OFF log, confirming the intended switch path. My reading is that this is evidence for a tail-latency benefit of the priority hint, not for bringing the 92% Series X scene inside the budget. The reversal also shows why one pair would have overstated a median gain: the sign of the median delta changed when run order changed. I can run longer/more repetitions if you want a stronger P99 claim; four runs already show the path applied and no instability in this scene. *Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.*
Author
Owner

@⁠Yuanzer on GitHub · 2026-11-29 19:29 UTC · original

Validation of current head 8fcd44bd on the reporter's machine (AI-assisted local runs):

  • i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40.
  • Title 1.0.2.1; Series X, internal 2560x1440, DLSS Quality preset M, frame generation off, ray tracing off, texture room 92%.
  • World clock held at 12:00 for every run; saved F1 profile was restored afterward.
  • Candidate binary built from 8fcd44bd. The same candidate was run with only VICTORY_RESIDENCY_PRIORITY changed between 0 and 1.
run median frame P90 P99 median draws Streamline over-budget warnings
priority OFF 60.5 ms 80.4 ms 87.0 ms 5,828 1,085
priority ON 60.7 ms 65.3 ms 75.5 ms 5,817 1,152

Both runs stayed in the same outcome category: one no-room texture line, one no-free-descriptor line, no OOM, no device-removed. Median was neutral; in this pair the ON run improved P90 by 15.1 ms and P99 by 11.5 ms.

The important check for the new commit is now positive. The ON log contains exactly two priority lines:

render targets, depth and memory shaders write: high residency priority
aliased render targets' heaps: high residency priority

Neither appears in the OFF log. So the new aliased-heap path is reached on this over-budget Series X scene, not merely the committed-resource path. I would call this one pair evidence for the intended tail behavior, not proof of a median gain or of staying inside the budget.

I can repeat the reversed order if you want a stronger claim; the head is otherwise stable in this scene.

Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.

**@⁠Yuanzer** on GitHub · 2026-11-29 19:29 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7261323276) Validation of current head 8fcd44bd on the reporter's machine (AI-assisted local runs): - i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40. - Title 1.0.2.1; Series X, internal 2560x1440, DLSS Quality preset M, frame generation off, ray tracing off, texture room 92%. - World clock held at 12:00 for every run; saved F1 profile was restored afterward. - Candidate binary built from 8fcd44bd. The same candidate was run with only VICTORY_RESIDENCY_PRIORITY changed between 0 and 1. | run | median frame | P90 | P99 | median draws | Streamline over-budget warnings | |---|---:|---:|---:|---:|---:| | priority OFF | 60.5 ms | 80.4 ms | 87.0 ms | 5,828 | 1,085 | | priority ON | 60.7 ms | 65.3 ms | 75.5 ms | 5,817 | 1,152 | Both runs stayed in the same outcome category: one no-room texture line, one no-free-descriptor line, no OOM, no device-removed. Median was neutral; in this pair the ON run improved P90 by 15.1 ms and P99 by 11.5 ms. The important check for the new commit is now positive. The ON log contains exactly two priority lines: ```text render targets, depth and memory shaders write: high residency priority aliased render targets' heaps: high residency priority ``` Neither appears in the OFF log. So the new aliased-heap path is reached on this over-budget Series X scene, not merely the committed-resource path. I would call this one pair evidence for the intended tail behavior, not proof of a median gain or of staying inside the budget. I can repeat the reversed order if you want a stronger claim; the head is otherwise stable in this scene. *Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.*
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 19:30 UTC · original

Thanks, Yuanzer: the four reversed runs are what this needed, and the correction about the log line is noted.

Two updates from my side:

  • 8fcd44bd also gives the high priority to the heaps behind aliased render targets (alias_rt.rs makes them with CreateHeap, so the committed-resource path never saw them). Since upstream 4ffb47bb turned aliasing off by default, that only matters with VICTORY_ALIAS_TARGETS=1; otherwise the PR behaves as at 8efdce32.
  • My A/B of that commit on an RTX 4060 Ti 8 GB / Ryzen 9 5900X / 64 GB (Series X, 1484x835 → 2560x1440, DLSS Balanced, clock held, five 60 s stretches at four places, runs A B B A with victory-probe-mod from #2825) is neutral. For example, median fps 14.2 / 14.2 (without) vs 13.8 / 14.4 (with) on one street, and 6.8 / 6.7 vs 6.8 / 5.6 at the heaviest place. With 64 GB of RAM the driver has room to demote into, so I did not expect a gain here.

Your reading matches mine: the hint decides what stays in VRAM when it runs out, so any effect should show in the tail, not the median. If you have time, 3+ runs per side in A B B A order would tell whether the P99 gain holds.

**@⁠RomanFama592** on GitHub · 2026-11-29 19:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7261335357) Thanks, Yuanzer: the four reversed runs are what this needed, and the correction about the log line is noted. Two updates from my side: - 8fcd44bd also gives the high priority to the heaps behind aliased render targets (`alias_rt.rs` makes them with `CreateHeap`, so the committed-resource path never saw them). Since upstream 4ffb47bb turned aliasing off by default, that only matters with `VICTORY_ALIAS_TARGETS=1`; otherwise the PR behaves as at 8efdce32. - My A/B of that commit on an RTX 4060 Ti 8 GB / Ryzen 9 5900X / 64 GB (Series X, 1484x835 → 2560x1440, DLSS Balanced, clock held, five 60 s stretches at four places, runs A B B A with victory-probe-mod from #2825) is neutral. For example, median fps 14.2 / 14.2 (without) vs 13.8 / 14.4 (with) on one street, and 6.8 / 6.7 vs 6.8 / 5.6 at the heaviest place. With 64 GB of RAM the driver has room to demote into, so I did not expect a gain here. Your reading matches mine: the hint decides what stays in VRAM when it runs out, so any effect should show in the tail, not the median. If you have time, 3+ runs per side in A B B A order would tell whether the P99 gain holds.
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 20:07 UTC · original

Thanks, that confirms the aliased-heap path is reached. One note: 8fcd44bd sits on 55d06914, before upstream 4ffb47bb turned target aliasing off by default. On current main the second line only shows with VICTORY_ALIAS_TARGETS=1.

Across your three pairs the P99 is lower with the priority on every time (86.3 → 68.2, 70.5 → 62.8 and 87.0 → 75.5 ms) while the median stays flat, which is what the hint is for.

If you rerun, the most useful comparison now is against #1733, merged upstream today. VICTORY_RESIDENCY_HIGH=1 gives card buffers, targets, depth and UAV textures the maximum priority, which covers what this PR prioritises and more. The PR head now includes current main, so three variants on it:

  • VICTORY_RESIDENCY_PRIORITY=1 (this PR);
  • VICTORY_RESIDENCY_PRIORITY=0 VICTORY_RESIDENCY_HIGH=1 (#1733 alone);
  • both.

If #1733 alone does as well, I'll reduce this PR to turning it on by default on machines with 24 GB of RAM or more, instead of keeping a second switch. I'm running the same three on the RTX 4060 Ti 8 GB now, unattended with victory-probe-mod's run-bench.ps1 (#2825), and will post the table.

**@⁠RomanFama592** on GitHub · 2026-11-29 20:07 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7261825517) Thanks, that confirms the aliased-heap path is reached. One note: 8fcd44bd sits on 55d06914, before upstream 4ffb47bb turned target aliasing off by default. On current main the second line only shows with `VICTORY_ALIAS_TARGETS=1`. Across your three pairs the P99 is lower with the priority on every time (86.3 → 68.2, 70.5 → 62.8 and 87.0 → 75.5 ms) while the median stays flat, which is what the hint is for. If you rerun, the most useful comparison now is against #1733, merged upstream today. `VICTORY_RESIDENCY_HIGH=1` gives card buffers, targets, depth and UAV textures the maximum priority, which covers what this PR prioritises and more. The PR head now includes current main, so three variants on it: - `VICTORY_RESIDENCY_PRIORITY=1` (this PR); - `VICTORY_RESIDENCY_PRIORITY=0 VICTORY_RESIDENCY_HIGH=1` (#1733 alone); - both. If #1733 alone does as well, I'll reduce this PR to turning it on by default on machines with 24 GB of RAM or more, instead of keeping a second switch. I'm running the same three on the RTX 4060 Ti 8 GB now, unattended with victory-probe-mod's `run-bench.ps1` (#2825), and will post the table.
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 21:49 UTC · original

This PR's priority against #1733 on the RTX 4060 Ti 8 GB / Ryzen 9 5900X / 64 GB, PR head with current main: Series X, 1484x835 → 2560x1440, DLSS Balanced. Three variants, two runs each, rotated, with the full example plan: clock held, five 60 s stretches at four places, the first 10 s of each left out. The runs were made automatically and unattended with victory-probe-mod's run-bench.ps1 (#2825, not merged yet). Two runs made while a screen share was running were discarded and repeated.

  • PRIORITY: VICTORY_RESIDENCY_PRIORITY=1 (this PR, the default with 24 GB of RAM or more)
  • HIGH: VICTORY_RESIDENCY_PRIORITY=0 VICTORY_RESIDENCY_HIGH=1 (#1733 alone)
  • both: VICTORY_RESIDENCY_HIGH=1 with this PR's default
stretch fps PRIORITY fps HIGH fps both p95 ms PRIORITY p95 ms HIGH p95 ms both GPU ms PRIORITY GPU ms HIGH GPU ms both
casa 20:00 15.1 15.2 15.2 89.1 89.2 87.0 54.4 54.0 55.2
porche 07:00 14.2 12.9 13.1 93.2 100.9 97.6 57.0 68.5 67.2
salida_casa 23:00 14.3 13.1 13.6 95.9 103.1 104.0 58.8 69.5 61.4
avenida 01:00 15.0 13.0 14.9 92.8 106.9 91.3 54.6 70.6 58.9
avenida 13:00 14.2 12.3 14.6 98.2 112.6 89.9 61.4 75.3 62.4
all stretches 14.7 13.0 14.3 93.2 102.9 94.1 57.2 69.8 60.7

Draws stayed within 3 % between variants (7,251 / 7,398 / 7,184 median), so the views matched.

On this card #1733 alone is worse than this PR's priority: 1.7 fps less, 12.6 ms more GPU time a frame and a p95 10 ms higher. Only the first stretch, right after loading, is even. Both together land close to this PR alone, a little behind. My guess, not measured: VICTORY_RESIDENCY_HIGH also puts card buffers at the maximum priority, and on an 8 GB card past its budget that leaves less room for what the frame reads. So this PR keeps its own switch, and on 8 GB cards VICTORY_RESIDENCY_HIGH is better left off with it.

@⁠Yuanzer, since you have already run #2825: run-bench.ps1 is in it now, and the same comparison is one command, with nobody at the PC:

powershell -File tools\victory-probe-mod\run-bench.ps1 -Game <game folder> -Plan tools\victory-probe-mod\plans\bench-example.txt -Variants "prio=VICTORY_RESIDENCY_PRIORITY=1,high=VICTORY_RESIDENCY_PRIORITY=0;VICTORY_RESIDENCY_HIGH=1,both=VICTORY_RESIDENCY_HIGH=1" -Repeats 2

It starts the game for each variant, presses Continue until the world is loaded, runs the plan, closes the game cleanly, and writes summary.md with the variants side by side. Your 32 GB machine would show whether the result holds with less RAM.

**@⁠RomanFama592** on GitHub · 2026-11-29 21:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7263181750) This PR's priority against #1733 on the RTX 4060 Ti 8 GB / Ryzen 9 5900X / 64 GB, PR head with current main: Series X, 1484x835 → 2560x1440, DLSS Balanced. Three variants, two runs each, rotated, with the full example plan: clock held, five 60 s stretches at four places, the first 10 s of each left out. The runs were made automatically and unattended with victory-probe-mod's `run-bench.ps1` (#2825, not merged yet). Two runs made while a screen share was running were discarded and repeated. - PRIORITY: `VICTORY_RESIDENCY_PRIORITY=1` (this PR, the default with 24 GB of RAM or more) - HIGH: `VICTORY_RESIDENCY_PRIORITY=0 VICTORY_RESIDENCY_HIGH=1` (#1733 alone) - both: `VICTORY_RESIDENCY_HIGH=1` with this PR's default | stretch | fps PRIORITY | fps HIGH | fps both | p95 ms PRIORITY | p95 ms HIGH | p95 ms both | GPU ms PRIORITY | GPU ms HIGH | GPU ms both | |---|---:|---:|---:|---:|---:|---:|---:|---:|---:| | casa 20:00 | 15.1 | 15.2 | 15.2 | 89.1 | 89.2 | 87.0 | 54.4 | 54.0 | 55.2 | | porche 07:00 | 14.2 | 12.9 | 13.1 | 93.2 | 100.9 | 97.6 | 57.0 | 68.5 | 67.2 | | salida_casa 23:00 | 14.3 | 13.1 | 13.6 | 95.9 | 103.1 | 104.0 | 58.8 | 69.5 | 61.4 | | avenida 01:00 | 15.0 | 13.0 | 14.9 | 92.8 | 106.9 | 91.3 | 54.6 | 70.6 | 58.9 | | avenida 13:00 | 14.2 | 12.3 | 14.6 | 98.2 | 112.6 | 89.9 | 61.4 | 75.3 | 62.4 | | all stretches | **14.7** | 13.0 | 14.3 | **93.2** | 102.9 | 94.1 | **57.2** | 69.8 | 60.7 | Draws stayed within 3 % between variants (7,251 / 7,398 / 7,184 median), so the views matched. On this card #1733 alone is worse than this PR's priority: 1.7 fps less, 12.6 ms more GPU time a frame and a p95 10 ms higher. Only the first stretch, right after loading, is even. Both together land close to this PR alone, a little behind. My guess, not measured: `VICTORY_RESIDENCY_HIGH` also puts card buffers at the maximum priority, and on an 8 GB card past its budget that leaves less room for what the frame reads. So this PR keeps its own switch, and on 8 GB cards `VICTORY_RESIDENCY_HIGH` is better left off with it. @⁠Yuanzer, since you have already run #2825: `run-bench.ps1` is in it now, and the same comparison is one command, with nobody at the PC: ```bat powershell -File tools\victory-probe-mod\run-bench.ps1 -Game <game folder> -Plan tools\victory-probe-mod\plans\bench-example.txt -Variants "prio=VICTORY_RESIDENCY_PRIORITY=1,high=VICTORY_RESIDENCY_PRIORITY=0;VICTORY_RESIDENCY_HIGH=1,both=VICTORY_RESIDENCY_HIGH=1" -Repeats 2 ``` It starts the game for each variant, presses Continue until the world is loaded, runs the plan, closes the game cleanly, and writes `summary.md` with the variants side by side. Your 32 GB machine would show whether the result holds with less RAM.
github-bot changed title from 8 GB cards: no first uploads past the budget, render targets resident first to 8 GB cards: no first uploads past the DXGI budget 2026-11-30 07:39:59 +00:00
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-30 07:38 UTC · original

The residency priority is now a pull request of its own, #3804, and off by default there (VICTORY_RESIDENCY_PRIORITY=1 turns it on); this one keeps the first-upload guard and its doc. @⁠Roybill203 @⁠Yuanzer, for an A/B of the priority, #3804's branch with VICTORY_RESIDENCY_PRIORITY=1 against without it is the pair now.

**@⁠RomanFama592** on GitHub · 2026-11-30 07:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7271951527) The residency priority is now a pull request of its own, #3804, and off by default there (`VICTORY_RESIDENCY_PRIORITY=1` turns it on); this one keeps the first-upload guard and its doc. @⁠Roybill203 @⁠Yuanzer, for an A/B of the priority, #3804's branch with `VICTORY_RESIDENCY_PRIORITY=1` against without it is the pair now.
github-bot changed title from 8 GB cards: no first uploads past the DXGI budget to Residency: VICTORY_FIRST_UPLOAD_GUARD=1 stops first uploads that keep an 8 GB card past its budget (off by default) 2026-11-30 16:46:01 +00:00
github-bot force-pushed github-bot/gh-1944 from 7fd79589ca to 50906cb9da 2026-11-30 16:46:02 +00:00 Compare
Author
Owner

@⁠davemathews12 on GitHub · 2026-11-30 18:19 UTC · original

I read the guard against first_upload_decision and room() on its base (c71899d). The rule looks right to me:

  • used here is the DXGI current usage (memory[1]), the same value the existing WholeCard check weighs, so the new check is consistent with it.
  • past_budget_refused matches both cases in the comment: an unknown size (reserve <= 1) past the budget, and the card being over by more than the free ranges hold. It goes after the FilledCeiling return, so the ceiling still wins first.
  • The test pins it to a real 4060 Ti room line. With the switch unset, the existing decisions are unchanged.

Two small things:

  1. A build issue once the workspace builds off Windows (#3687). first_upload_guard is #[cfg(any(windows, test))], but crate::asked_for! is defined only #[cfg(windows)] (switch.rs). So a non-Windows test build fails on it, while today's Windows CI passes. The other switch readers handle this by keeping the macro call cfg(windows) with a stand-in elsewhere:
    #[cfg(windows)]
    fn first_upload_guard() -> bool { /* as now */ }
    #[cfg(all(test, not(windows)))]
    fn first_upload_guard() -> bool { false }
    
  2. A path the guard never sees (a note, probably intended). first_upload_decision returns Allow first when room(memory) is true. room() is true whenever the texture copies are under texture_floor_bytes (min(2 GB, budget/4), about 1.7 GB on an 8 GB card), however far DXGI usage is past the budget. So with render targets alone over the budget and fewer than about 1.7 GB of texture copies, the guard doesn't run. The floor caps how much that can add, so it's bounded. Worth a line in docs/8gb-cards.md if that's the intent.
**@⁠davemathews12** on GitHub · 2026-11-30 18:19 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7287669201) I read the guard against `first_upload_decision` and `room()` on its base (c71899d). The rule looks right to me: - `used` here is the DXGI current usage (`memory[1]`), the same value the existing `WholeCard` check weighs, so the new check is consistent with it. - `past_budget_refused` matches both cases in the comment: an unknown size (`reserve <= 1`) past the budget, and the card being over by more than the free ranges hold. It goes after the `FilledCeiling` return, so the ceiling still wins first. - The test pins it to a real 4060 Ti room line. With the switch unset, the existing decisions are unchanged. Two small things: 1. **A build issue once the workspace builds off Windows (#3687).** `first_upload_guard` is `#[cfg(any(windows, test))]`, but `crate::asked_for!` is defined only `#[cfg(windows)]` (`switch.rs`). So a non-Windows test build fails on it, while today's Windows CI passes. The other switch readers handle this by keeping the macro call `cfg(windows)` with a stand-in elsewhere: ```rust #[cfg(windows)] fn first_upload_guard() -> bool { /* as now */ } #[cfg(all(test, not(windows)))] fn first_upload_guard() -> bool { false } ``` 2. **A path the guard never sees** (a note, probably intended). `first_upload_decision` returns `Allow` first when `room(memory)` is true. `room()` is true whenever the texture copies are under `texture_floor_bytes` (min(2 GB, budget/4), about 1.7 GB on an 8 GB card), however far DXGI usage is past the budget. So with render targets alone over the budget and fewer than about 1.7 GB of texture copies, the guard doesn't run. The floor caps how much that can add, so it's bounded. Worth a line in `docs/8gb-cards.md` if that's the intent.
asked_for! exists only on Windows, so a test build elsewhere (#3687) would
not compile first_upload_guard; a false stand-in covers it, as the other
switch readers do. docs/8gb-cards.md: below the black-face fix's floor a
first upload is allowed before the guard is asked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WiREjDTE7b3pRCmCoV3FDx
Author
Owner

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

Thanks for reading it this closely; both points are right.

  1. first_upload_guard is now cfg(windows), with a false stand-in for cfg(all(test, not(windows))), as the other switch readers do.
  2. Yes, that path is intended: below the black-face fix's floor (the smaller of 2 GB and a quarter of the budget) a first upload is allowed before the guard is asked, and the floor bounds what that adds. docs/8gb-cards.md says so now.
**@⁠RomanFama592** on GitHub · 2026-11-30 19:19 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7289219450) Thanks for reading it this closely; both points are right. 1. `first_upload_guard` is now `cfg(windows)`, with a `false` stand-in for `cfg(all(test, not(windows)))`, as the other switch readers do. 2. Yes, that path is intended: below the black-face fix's floor (the smaller of 2 GB and a quarter of the budget) a first upload is allowed before the guard is asked, and the floor bounds what that adds. `docs/8gb-cards.md` says so now.
Author
Owner

@⁠Damix49 on GitHub · 2026-12-01 09:39 UTC · original

Hello @⁠RomanFama592. Tried this on another 5900X with an 8 GB card: Ryzen 9 5900X + RTX 3070 Ti (8 GB, DXGI budget 6.7 GB) + 32 GB DDR4-3600, Windows 11, driver 617.42. The PR (39e1cade) was merged onto main at 5fabb46e with no conflicts, release build with --features ab, launched with scripts\play-nvidia.ps1, VICTORY_FIRST_UPLOAD_GUARD=1. Frame generation off, no VICTORY_VRAM_BUDGET_MB.

The guard never ran. first_upload_guard() logs VICTORY_FIRST_UPLOAD_GUARD=1: past the budget, no first uploads that keep the card over it the first time it is called, and that line never appeared:

run time in game card memory textures waiting guard line
Series S 720, DLSS Quality ~15 min 7.0 GB against a 6.7 GB budget (advisor) 21,426 none
Series X 1080p to 1440p, DLSS Balanced ~5 min 7.75 GB dedicated + 8.0 GB shared 16,855 none

So every first-upload decision returned before line 2807 of resource.rs, either at room_ok or at one of the earlier refusals (explicit limit, allowance off, FilledCeiling). With ~17-21k textures waiting, my guess is FilledCeiling: the texture copies are already at the face ceiling, so the guard is never asked. I haven't counted FIRST_UPLOAD_REASONS to confirm, though. On this base the card still went past its budget: the grey/white ground, skin and bushes look like the refused slots, plus the memory growth discussed in #2415 / #4079 (process ~29-35 GB, RAM 0.1-0.5 GB free on 32 GB).

So with current main on this PC, guard on and off would give the same run. If the order of those checks changed after your 4060 Ti runs, the guard may need to come before the ceiling to bite. Happy to re-run with a build that logs the reasons, if useful.

**@⁠Damix49** on GitHub · 2026-12-01 09:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1944#issuecomment-7307007338) Hello @⁠RomanFama592. Tried this on another 5900X with an 8 GB card: Ryzen 9 5900X + RTX 3070 Ti (8 GB, DXGI budget 6.7 GB) + 32 GB DDR4-3600, Windows 11, driver 617.42. The PR (`39e1cade`) was merged onto `main` at `5fabb46e` with no conflicts, release build with `--features ab`, launched with `scripts\play-nvidia.ps1`, `VICTORY_FIRST_UPLOAD_GUARD=1`. Frame generation off, no `VICTORY_VRAM_BUDGET_MB`. **The guard never ran.** `first_upload_guard()` logs `VICTORY_FIRST_UPLOAD_GUARD=1: past the budget, no first uploads that keep the card over it` the first time it is called, and that line never appeared: | run | time in game | card memory | textures waiting | guard line | |---|---|---|---|---| | Series S 720, DLSS Quality | ~15 min | 7.0 GB against a 6.7 GB budget (advisor) | 21,426 | none | | Series X 1080p to 1440p, DLSS Balanced | ~5 min | 7.75 GB dedicated + 8.0 GB shared | 16,855 | none | So every first-upload decision returned before line 2807 of `resource.rs`, either at `room_ok` or at one of the earlier refusals (explicit limit, allowance off, `FilledCeiling`). With ~17-21k textures waiting, my guess is `FilledCeiling`: the texture copies are already at the face ceiling, so the guard is never asked. I haven't counted `FIRST_UPLOAD_REASONS` to confirm, though. On this base the card still went past its budget: the grey/white ground, skin and bushes look like the refused slots, plus the memory growth discussed in #2415 / #4079 (process ~29-35 GB, RAM 0.1-0.5 GB free on 32 GB). So with current `main` on this PC, guard on and off would give the same run. If the order of those checks changed after your 4060 Ti runs, the guard may need to come before the ceiling to bite. Happy to re-run with a build that logs the reasons, if useful.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1944/head:github-bot/gh-1944'
git switch 'github-bot/gh-1944'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1944'
git switch 'github-bot/gh-1944'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1944'
git switch 'github-bot/gh-1944'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1944'
git switch 'main'
git merge --squash 'github-bot/gh-1944'
git switch 'main'
git merge --ff-only 'github-bot/gh-1944'
git switch 'main'
git merge 'github-bot/gh-1944'
git push origin 'main'
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!1944
No description provided.