Memory: fit console memory onto small cards #1477

Closed
github-bot wants to merge 5 commits from github-bot/gh-1477 into main AGit
Owner

@⁠Shad0wrend on GitHub · 2026-11-28 20:31 UTC · original
Shad0wrend:memory/low-vram-accounting → main · +664 −76 · 9 files · 5 commits · closed without merging

What

Memory work grounded in the console's documented memory model.

  • Small-card defaults in the standalone executable. victory.exe queries the DXGI adapter before starting the title. A card of 9 GiB or less gets an 85%-of-VRAM budget cap (max 7 GiB) and no ahead-allocated buffers. VICTORY_LOW_VRAM=0 turns it off; F1/menu and --set still override. The initially tried 512 MiB card-buffer cap, tiled texture levels and fixed texture-room share were removed after A/B: all three were slower on an 8 GiB card.
  • Less idle card memory. Empty texture-pool blocks are capped at a fifth of the card budget (1.6 GiB on 8 GiB instead of 4 GiB), with VICTORY_POOL_SPARES to override. Speculative texture prefetch is throttled when the card's texture room line is reached, as well as on host commit pressure.
  • Both title memory pools. Console::title_memory() now reports the documented advanced figures for both consoles. Series S was reported as 7,776 MiB standard with zero GPU-optimal memory, so XMemGetWorkingSetStatistics.gpu_optimal_limit and the DXGI adapter's DedicatedVideoMemory told titles they had no fast memory.
  • Working set is the title's own memory. XMemGetWorkingSetStatistics no longer answers title_used with the whole process commit. It tracks bytes the title committed and mapped from physical pages, by bandwidth class, through XMemVirtualAlloc, page mapping and free/decommit. Memory transferred to the system is no longer counted as the title's.

docs/low-vram.md documents the figures, the switches, the A/B result and what is still not emulated. No game paths, logs or binaries are in the repository.

In-game A/B (RTX 3070, 8 GB)

Consecutive runs of the same build, matching heavy gameplay scenes by draws/frame:

Configuration fps ms/frame
Old behavior (VICTORY_LOW_VRAM=0) 9.2 110.7
Full initially-tried small-card profile 2.3 441.7
Profile with stock buffer cap, no tiled levels, default room line 9.6 105.8

The 512 MiB buffer cap left only 4 card copies instead of 3,407: preparing rose from 80 ms to 287 ms and the card waited 233 ms instead of 32 ms. Card-copy class routing was tried in a stacked commit and removed after measuring 4.77 fps vs 9.25 fps on matched scenes.

Validation

  • cargo build --release --locked -p victory — passed.
  • cargo test --release --locked -p victory -p victory-gpu -p victory-hle — green (31 + 2 + 553 + 205 + 1 tests, 0 failures).
  • cargo run --release --quiet -p xtask -- policy --staged — passed before each commit.
  • Clippy on the changed crates with pre-existing upstream lints allowed — clean. Plain workspace clippy is blocked by unrelated upstream warnings; full workspace tests have 7 pre-existing WARP/shader failures, reproduced on unmodified main.

The A/B runs were performed by the hardware owner; the final build was smoke-run with the original settings.

**@⁠Shad0wrend** on GitHub · 2026-11-28 20:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1477) `Shad0wrend:memory/low-vram-accounting` → `main` · +664 −76 · 9 files · 5 commits · closed without merging ## What Memory work grounded in the console's documented memory model. - **Small-card defaults in the standalone executable.** `victory.exe` queries the DXGI adapter before starting the title. A card of 9 GiB or less gets an 85%-of-VRAM budget cap (max 7 GiB) and no ahead-allocated buffers. `VICTORY_LOW_VRAM=0` turns it off; F1/menu and `--set` still override. The initially tried 512 MiB card-buffer cap, tiled texture levels and fixed texture-room share were **removed after A/B**: all three were slower on an 8 GiB card. - **Less idle card memory.** Empty texture-pool blocks are capped at a fifth of the card budget (1.6 GiB on 8 GiB instead of 4 GiB), with `VICTORY_POOL_SPARES` to override. Speculative texture prefetch is throttled when the card's texture room line is reached, as well as on host commit pressure. - **Both title memory pools.** `Console::title_memory()` now reports the documented advanced figures for both consoles. Series S was reported as 7,776 MiB standard with *zero* GPU-optimal memory, so `XMemGetWorkingSetStatistics.gpu_optimal_limit` and the DXGI adapter's `DedicatedVideoMemory` told titles they had no fast memory. - **Working set is the title's own memory.** `XMemGetWorkingSetStatistics` no longer answers `title_used` with the whole process commit. It tracks bytes the title committed and mapped from physical pages, by bandwidth class, through `XMemVirtualAlloc`, page mapping and free/decommit. Memory transferred to the system is no longer counted as the title's. `docs/low-vram.md` documents the figures, the switches, the A/B result and what is still not emulated. No game paths, logs or binaries are in the repository. ## In-game A/B (RTX 3070, 8 GB) Consecutive runs of the same build, matching heavy gameplay scenes by draws/frame: | Configuration | fps | ms/frame | |---|---:|---:| | Old behavior (`VICTORY_LOW_VRAM=0`) | 9.2 | 110.7 | | Full initially-tried small-card profile | 2.3 | 441.7 | | Profile with stock buffer cap, no tiled levels, default room line | **9.6** | **105.8** | The 512 MiB buffer cap left only 4 card copies instead of 3,407: preparing rose from 80 ms to 287 ms and the card waited 233 ms instead of 32 ms. Card-copy class routing was tried in a stacked commit and removed after measuring 4.77 fps vs 9.25 fps on matched scenes. ## Validation - `cargo build --release --locked -p victory` — passed. - `cargo test --release --locked -p victory -p victory-gpu -p victory-hle` — green (31 + 2 + 553 + 205 + 1 tests, 0 failures). - `cargo run --release --quiet -p xtask -- policy --staged` — passed before each commit. - Clippy on the changed crates with pre-existing upstream lints allowed — clean. Plain workspace clippy is blocked by unrelated upstream warnings; full workspace tests have 7 pre-existing WARP/shader failures, reproduced on unmodified `main`. The A/B runs were performed by the hardware owner; the final build was smoke-run with the original settings.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 20:34:19 +00:00
github-bot force-pushed github-bot/gh-1477 from 79cad8a97c to 19f724b860 2026-11-28 21:19:18 +00:00 Compare
github-bot force-pushed github-bot/gh-1477 from 91849af26b to e3a049ffec 2026-11-28 21:48:49 +00:00 Compare
github-bot force-pushed github-bot/gh-1477 from 363a549751 to 1190108054 2026-11-29 00:39:29 +00:00 Compare
github-bot closed this pull request 2026-11-29 01:40:29 +00:00
Author
Owner

@⁠Shad0wrend on GitHub · 2026-11-29 01:39 UTC · original

Closing per maintainer request; not pursuing these changes.

**@⁠Shad0wrend** on GitHub · 2026-11-29 01:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1477#issuecomment-7248930591) Closing per maintainer request; not pursuing these changes.

Pull request closed

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!1477
No description provided.