gpu: levels on demand on a budget up to 12 GiB, not 8 #2600

Open
superboynick wants to merge 1 commit from upstream-pr/2600 into main
superboynick commented 2026-11-29 14:50:42 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by superboynick on 2026-11-29T14:50:42Z.


The automatic threshold for levels-on-demand is 8 GiB, which was chosen before a card in the 8-12 GiB band was measured. A 12 GB RTX 5070 Ti Laptop has a DXGI budget of 10,857 MB, so it sits above the line and made every level resident.

At Series X that costs the frame outright: the card's own memory ran to 9,816 MB of 10,857 while 7,626 MB was already shared with the card out of system memory, and then 157 distinct pipelines came back 0x8007000e, with each frame dropping 636 of 2,004, then 1,361 of 2,143, then 645 of 2,151 draws: 0.3 fps.

Measured on that card, Series X at 2560x1440 with DLSS Quality and the switch set scripts\play-foxhound.ps1 applies, sampling the title's own counter every 5 s and discarding the first 120 s:

levels on demand median median draws peak video memory
off (today's automatic default at this budget) 0.3 fps 2,151 11,759 MB
on 6 fps 4,863 11,917 MB

And the automatic path itself, at Series S with nothing set in the environment, now logs tier=4 on=true and runs 10 fps median, p10 9, 4,490 draws - the same as it did with the switch set by hand, so the automatic path carries those numbers.

Scope. This changes one comparison and its two doc comments; the switch's meaning, the tier-2 requirement, and VICTORY_LEVELS_ON_DEMAND=0/1 all behave as before, so anyone who wants it off on a 12 GiB card still has the switch. cargo test -p victory-gpu --lib -- tiles: 6 passed, 0 failed, 1 ignored; cargo build --release -p victory is clean.

What this does not fix. Whether a 12 GB card should be offered Series X at all at this budget is #2520; the title still runs out of shared memory there and still crashes under that pressure. This only stops the automatic path from leaving off the one switch that measurably helped on the card it helps most. docs/findings.md in #2588 has the full table and the Series S frame in parts.

Checked for overlap: tiles.rs is untouched by the memory work in #1463/#971/#718 (those are shadow.rs and the allocator), and PS5-style tile pools are not in this file. Claimed under #2520, per #1528.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5551861641 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2600). Originally posted by [superboynick](https://github.com/superboynick) on 2026-11-29T14:50:42Z. --- The automatic threshold for levels-on-demand is 8 GiB, which was chosen before a card in the 8-12 GiB band was measured. A 12 GB RTX 5070 Ti Laptop has a DXGI budget of **10,857 MB**, so it sits above the line and made every level resident. At Series X that costs the frame outright: the card's own memory ran to 9,816 MB of 10,857 while **7,626 MB was already shared with the card** out of system memory, and then **157 distinct pipelines came back `0x8007000e`**, with each frame dropping 636 of 2,004, then 1,361 of 2,143, then 645 of 2,151 draws: **0.3 fps**. Measured on that card, Series X at 2560x1440 with DLSS Quality and the switch set `scripts\play-foxhound.ps1` applies, sampling the title's own counter every 5 s and discarding the first 120 s: | levels on demand | median | median draws | peak video memory | |---|---:|---:|---:| | off (today's automatic default at this budget) | 0.3 fps | 2,151 | 11,759 MB | | on | 6 fps | 4,863 | 11,917 MB | And the automatic path itself, at Series S with nothing set in the environment, now logs `tier=4 on=true` and runs **10 fps median, p10 9, 4,490 draws** - the same as it did with the switch set by hand, so the automatic path carries those numbers. **Scope.** This changes one comparison and its two doc comments; the switch's meaning, the tier-2 requirement, and `VICTORY_LEVELS_ON_DEMAND=0/1` all behave as before, so anyone who wants it off on a 12 GiB card still has the switch. `cargo test -p victory-gpu --lib -- tiles`: 6 passed, 0 failed, 1 ignored; `cargo build --release -p victory` is clean. **What this does not fix.** Whether a 12 GB card should be offered Series X at all at this budget is #2520; the title still runs out of shared memory there and still crashes under that pressure. This only stops the automatic path from leaving off the one switch that measurably helped on the card it helps most. `docs/findings.md` in #2588 has the full table and the Series S frame in parts. Checked for overlap: `tiles.rs` is untouched by the memory work in #1463/#971/#718 (those are `shadow.rs` and the allocator), and PS5-style tile pools are not in this file. Claimed under #2520, per #1528.
DoubleD17 commented 2026-11-30 03:37:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-30T03:37:12Z.


We have a 12 GB card in exactly this band (RTX 5070, DXGI budget 11,175 MB), so we ran a test.

For victory play this PR changes nothing: apps/victory/src/play.rs sets VICTORY_LEVELS_ON_DEMAND=0 ("Off again (2026-11-28) while foliage flickers in play"), so the 12 GiB line is never reached from the launcher. To see what it would do, we ran main 41adb551 with VICTORY_LEVELS_ON_DEMAND=1 against main itself.

CPU prep (ms/frame) fps (mean) shared memory (steady) private memory (steady) card's own memory
controls (4 runs) 60.4–69.4 11.6–13.6 8.2–9.7 GB (mean 8.8) 31.9–33.5 GB (mean 32.6) 10.5–10.7 GB
on, round 1 68.1 (controls at that point 69.0) 11.87 10.3 GB 33.7 GB 10.5 GB
on, round 2 65.3 (68.7) 11.98 10.8 GB 34.8 GB 10.6 GB

On this card, turning it on added about 1.8 GB of shared memory and 1.6 GB of private memory, with no change in frame rate (−2.1 ms prep, +1.5 % fps, both inside the noise). The card's own memory stayed at the budget either way. No foliage flicker in 160 frames looked at frame by frame. Here this card never ran out of memory, unlike the 5070 Ti Laptop in the description, so this is not the case the PR was made for.

Setup:

  • Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11;
  • Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off;
  • main 41adb551 with the switch, against 41adb551 without it;
  • 150 s runs in two rounds (the second in reverse order), with four control runs spread through the session;
  • every run starts from the same save, restored before each run;
  • figures are medians of the 5 s host lines; memory is the median of the last ~100 s of each run.

AI Assisted

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7268048708 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2600#issuecomment-7268048708). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-11-30T03:37:12Z. --- We have a 12 GB card in exactly this band (RTX 5070, DXGI budget 11,175 MB), so we ran a test. **For `victory play` this PR changes nothing:** `apps/victory/src/play.rs` sets `VICTORY_LEVELS_ON_DEMAND=0` ("Off again (2026-11-28) while foliage flickers in play"), so the 12 GiB line is never reached from the launcher. To see what it would do, we ran main 41adb551 with `VICTORY_LEVELS_ON_DEMAND=1` against main itself. | | CPU prep (ms/frame) | fps (mean) | shared memory (steady) | private memory (steady) | card's own memory | |---|---|---|---|---|---| | controls (4 runs) | 60.4–69.4 | 11.6–13.6 | 8.2–9.7 GB (mean 8.8) | 31.9–33.5 GB (mean 32.6) | 10.5–10.7 GB | | on, round 1 | 68.1 (controls at that point 69.0) | 11.87 | 10.3 GB | 33.7 GB | 10.5 GB | | on, round 2 | 65.3 (68.7) | 11.98 | 10.8 GB | 34.8 GB | 10.6 GB | On this card, turning it on **added about 1.8 GB of shared memory and 1.6 GB of private memory**, with no change in frame rate (−2.1 ms prep, +1.5 % fps, both inside the noise). The card's own memory stayed at the budget either way. No foliage flicker in 160 frames looked at frame by frame. Here this card never ran out of memory, unlike the 5070 Ti Laptop in the description, so this is not the case the PR was made for. **Setup:** - Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11; - Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off; - main 41adb551 with the switch, against 41adb551 without it; - 150 s runs in two rounds (the second in reverse order), with four control runs spread through the session; - every run starts from the same save, restored before each run; - figures are medians of the 5 s host lines; memory is the median of the last ~100 s of each run. AI Assisted
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2600:upstream-pr/2600'
git switch 'upstream-pr/2600'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2600'
git switch 'upstream-pr/2600'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2600'
git switch 'upstream-pr/2600'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2600'
git switch 'main'
git merge --squash 'upstream-pr/2600'
git switch 'main'
git merge --ff-only 'upstream-pr/2600'
git switch 'main'
git merge 'upstream-pr/2600'
git push origin 'main'
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!2600
No description provided.