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
Zayfway wants to merge 1 commit from upstream-pr/225 into main
Zayfway commented 2026-11-26 12:00:51 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by Zayfway on 2026-11-26T12:00:51Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6626197564 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/225). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-26T12:00:51Z. --- 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)
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/225:upstream-pr/225'
git switch 'upstream-pr/225'

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/225'
git switch 'upstream-pr/225'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/225'
git switch 'upstream-pr/225'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/225'
git switch 'main'
git merge --squash 'upstream-pr/225'
git switch 'main'
git merge --ff-only 'upstream-pr/225'
git switch 'main'
git merge 'upstream-pr/225'
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
avatarmanz/VIctory-7900XTX!225
No description provided.