Card buffers on 10-12 GB cards: every title buffer, 1536 MiB (2.5 -> 6.9 fps on an RTX 3060 12 GB) #225

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

@⁠Zayfway on GitHub · 2026-11-26 12:00 UTC · original
Zayfway:nvidia-12gb-card-buffers → main · +50 −29 · 1 files · 1 commits · open

On 10–12 GB cards the automatic card-buffer limits (default_card_limits_mb, fffafee) are 16 MiB and up / 512 MiB. On an RTX 3060 12 GB with 16 GB of RAM this keeps nearly every title buffer copy in the PC's memory, and the opening cutscenes run at about 2.5 fps. This PR gives budgets above 9 GiB and up to 12 GiB every title buffer (64 KiB and up) and 1536 MiB.

Nothing else changes:

  • 8 GB budgets (≤ 9 GiB), 16 GB budgets and ≥ 20 GiB budgets keep their values.
  • VICTORY_CARD_BUFFERS_MIN_MB, VICTORY_CARD_BUFFERS_MIN_KB and VICTORY_CARD_BUFFERS_MB still override.
  • The default minimum is now kept in KiB so it can be below 1 MiB. The MiB override still clamps to at least 1 MiB, as before.

Measurements

PC: RTX 3060 12 GB (WDDM budget 11,342 MiB), Ryzen 7 5700X, 16 GB RAM, Windows 11, Series S profile.

Method:

  • scripts/play.ps1 settings, not -Safe.
  • Diagnostics build.
  • A new game from the start, with a fresh profile for every run.
  • Time-weighted fps from the frame lines over world+0..150 s. That window covers the opening cutscenes and credits.
  • One run each.
Build Card buffer limits (log line) fps, world+0..150 s
0dec5dc (main) min 16384 KiB, max 512 MiB 2.51
0dec5dc + VICTORY_CARD_BUFFERS_MB=1536 min 16384 KiB, max 1536 MiB 3.21
0dec5dc + VICTORY_CARD_BUFFERS_MB=1536 + VICTORY_CARD_BUFFERS_MIN_KB=64 min 64 KiB, max 1536 MiB 6.96
this PR (25e94d4), no override min 64 KiB, max 1536 MiB 6.92

The size cap and the minimum both matter: raising only the cap gave little.

Same switch on codec-d/cool_fox f4b48ad, whose launcher already sets CARD_BUFFERS_MIN_KB=64. Same PC, same method:

  • Max 512 MiB (its default): 1.96 fps. The title stopped on its own int3 at world+300 s, where a global pool of the title ran out.
  • Max 1536 MiB: 9.96 fps.
  • A full intro with that cap (1,000 s, up to Lucia following the guard in the prison): 9.7 fps in the cutscenes, 11.7 fps in the prison, and no crash.

Tests

  • cargo test -p victory-gpu --lib card_limits: 1 passed. The test is updated for the new tier and the KiB minimum, and checks an 11,342 MiB budget.
  • cargo test -p victory-gpu --lib shadow: 35 passed, 1 ignored.
  • cargo clippy -p victory-gpu --lib -- -D warnings: clean.

Not tested

  • A 10–12 GB AMD card. #11 (RX 6750 XT 12 GB, 16 GB RAM) would get these limits too.
  • Gameplay past the prison.
  • A Series X profile.

🤖 Generated with Claude Code

**@⁠Zayfway** on GitHub · 2026-11-26 12:00 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/225) `Zayfway:nvidia-12gb-card-buffers` → `main` · +50 −29 · 1 files · 1 commits · open On 10–12 GB cards the automatic card-buffer limits (`default_card_limits_mb`, fffafee) are 16 MiB and up / 512 MiB. On an RTX 3060 12 GB with 16 GB of RAM this keeps nearly every title buffer copy in the PC's memory, and the opening cutscenes run at about 2.5 fps. This PR gives budgets above 9 GiB and up to 12 GiB every title buffer (64 KiB and up) and 1536 MiB. Nothing else changes: - 8 GB budgets (≤ 9 GiB), 16 GB budgets and ≥ 20 GiB budgets keep their values. - `VICTORY_CARD_BUFFERS_MIN_MB`, `VICTORY_CARD_BUFFERS_MIN_KB` and `VICTORY_CARD_BUFFERS_MB` still override. - The default minimum is now kept in KiB so it can be below 1 MiB. The MiB override still clamps to at least 1 MiB, as before. ### Measurements **PC:** RTX 3060 12 GB (WDDM budget 11,342 MiB), Ryzen 7 5700X, 16 GB RAM, Windows 11, Series S profile. **Method:** - `scripts/play.ps1` settings, not `-Safe`. - Diagnostics build. - A new game from the start, with a fresh profile for every run. - Time-weighted fps from the frame lines over world+0..150 s. That window covers the opening cutscenes and credits. - One run each. | Build | Card buffer limits (log line) | fps, world+0..150 s | |---|---|---| | 0dec5dc (main) | min 16384 KiB, max 512 MiB | 2.51 | | 0dec5dc + `VICTORY_CARD_BUFFERS_MB=1536` | min 16384 KiB, max 1536 MiB | 3.21 | | 0dec5dc + `VICTORY_CARD_BUFFERS_MB=1536` + `VICTORY_CARD_BUFFERS_MIN_KB=64` | min 64 KiB, max 1536 MiB | 6.96 | | **this PR (25e94d4), no override** | min 64 KiB, max 1536 MiB | **6.92** | The size cap and the minimum both matter: raising only the cap gave little. **Same switch on codec-d/cool_fox f4b48ad**, whose launcher already sets `CARD_BUFFERS_MIN_KB=64`. Same PC, same method: - Max 512 MiB (its default): 1.96 fps. The title stopped on its own `int3` at world+300 s, where a global pool of the title ran out. - Max 1536 MiB: 9.96 fps. - A full intro with that cap (1,000 s, up to Lucia following the guard in the prison): 9.7 fps in the cutscenes, 11.7 fps in the prison, and no crash. ### Tests - `cargo test -p victory-gpu --lib card_limits`: 1 passed. The test is updated for the new tier and the KiB minimum, and checks an 11,342 MiB budget. - `cargo test -p victory-gpu --lib shadow`: 35 passed, 1 ignored. - `cargo clippy -p victory-gpu --lib -- -D warnings`: clean. ### Not tested - A 10–12 GB AMD card. #11 (RX 6750 XT 12 GB, 16 GB RAM) would get these limits too. - Gameplay past the prison. - A Series X profile. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With 16 MiB / 512 MiB an RTX 3060 12 GB (budget 11,342 MiB) on a 16 GB PC
ran the opening cutscenes at 2.5 fps on 0dec5dc; with every title buffer
(64 KiB and up) and 1536 MiB, 6.9-7.0. The small copies left in the PC's
memory are nearly all the copies there are, and every load, store and
atomic a shader does on them crosses the bus. 8 GB and 16 GB budgets keep
their defaults; the minimum's default is now in KiB so that it can be
under 1 MiB (VICTORY_CARD_BUFFERS_MIN_MB still sets it in MiB, at least 1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 12:04:49 +00:00
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/225/head:github-bot/gh-225'
git switch 'github-bot/gh-225'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-225'
git switch 'github-bot/gh-225'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-225'
git switch 'github-bot/gh-225'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-225'
git switch 'main'
git merge --squash 'github-bot/gh-225'
git switch 'main'
git merge --ff-only 'github-bot/gh-225'
git switch 'main'
git merge 'github-bot/gh-225'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.