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

Open
github-bot wants to merge 1 commit from github-bot/gh-2600 into main AGit
Owner

@⁠superboynick on GitHub · 2026-11-29 14:50 UTC · original
superboynick:perf/levels-12gib → main · +10 −3 · 1 files · 1 commits · open

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.

**@⁠superboynick** on GitHub · 2026-11-29 14:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2600) `superboynick:perf/levels-12gib` → `main` · +10 −3 · 1 files · 1 commits · open 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.
The automatic threshold was 8 GiB, chosen before a card in the 8-12 GiB band was measured. A 12 GB
RTX 5070 Ti Laptop (DXGI budget 10,857 MB) sits above it and therefore made its textures with every
level resident, and at Series X it ran the card's own memory to 9,816 MB of that budget while
7,626 MB was already shared with the card out of system memory; then 157 distinct pipelines came
back `0x8007000e` and each frame dropped 636 of 2,004, 1,361 of 2,143 and 645 of 2,151 draws,
0.3 fps. With `VICTORY_LEVELS_ON_DEMAND=1` the same run was 6 fps at 11,917 MB of card memory.

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:

| levels on demand | median | draws | peak video memory |
|---|---:|---:|---:|
| off (the automatic default above 8 GiB) | 0.3 fps | 2,151 | 11,759 MB |
| on | 6 fps | 4,863 | 11,917 MB |

At Series S the same build with the threshold moved reports `tier=4 on=true` on its own 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 is what those numbers describe.

Whether the card should be offered Series X at all at this budget is #2520; this only stops the
automatic path from leaving a switch off on the card it helps most.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 14:56:13 +00:00
Author
Owner

@⁠DoubleD17 on GitHub · 2026-11-30 03:37 UTC · original · edited 2026-11-30 09:56 UTC

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

**@⁠DoubleD17** on GitHub · 2026-11-30 03:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2600#issuecomment-7268048708) · edited 2026-11-30 09:56 UTC 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 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/2600/head:github-bot/gh-2600'
git switch 'github-bot/gh-2600'

Merge

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