feat: memory caps follow the card's budget and the PC's RAM #256
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!256
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-256"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Skyfrye on GitHub · 2026-11-25 21:57 UTC · original
Skyfrye:nep/memory-caps-follow-machine→main· +310 −45 · 11 files · 1 commits · draftDraft: the in-game check on this base is pending (the test machine's GPU is in use for a few hours). Everything below the game run is done.
Change
The launcher sets Neptune's switch set, which is tuned for a 16 GB card and a 32 GB PC (its own note: "on smaller cards, lower
VICTORY_CARD_WINDOWS_MBandVICTORY_CARD_BUFFERS_MB"). On an 8 GB card those two alone ask for 5.6 GB of copies in a budget of about 7.2 GB, before any texture or render target; on a 16 GB PC the idle list pool, texture staging and upload pools keep their 32 GB values.Now the engine sizes these caps from the machine when their switch is not set (
memplan.rs):QueryVideoMemoryInfo), proportionally to a 14.4 GiB reference;GlobalMemoryStatusEx), proportionally to a 31 GiB reference (a "32 GB" PC reports a little less);On the reference machine (16 GB card, 32 GB RAM) the values are exactly the launcher's former ones, so nothing changes there. Any of the seven switches still wins when set. The plan is logged once at INFO with the budget, the RAM, each cap and the switches that overrode it. The two card caps are asked of the plan at each use (the plan keeps its answer once the card has reported a budget), so a cap asked before the device exists does not stay at its floor.
The launcher no longer sets the five absolute values (
VICTORY_CARD_WINDOWS_MB,VICTORY_CARD_BUFFERS_MB,VICTORY_LIST_POOL_MB,VICTORY_LIST_POOL_MOST,VICTORY_TEXTURE_STAGE_MB); its test and the "16 GB card" sentences ofdocs/running-gta6.mdanddocs/fr/lancer-gta6.mdfollow.(MB; card budget taken as 0.9 x the card's size.)
Linked issue: none.
Verification
Windows 11 26300, Rust 1.98.1 (MSVC), RTX 5080 (16 GB), 32 GB RAM, on upstream
mainataffaf15, fromthird_party/victory:With
planmade to return the reference values always,smaller_cards_and_less_ram_get_less_but_not_below_floorsfails.Not run:
python -m pytest tests/test_lanceur_victory.pyand ruff (not installed on this machine; the test's 12 functions without fixtures were run by hand and pass; CI runs the rest). Pending: a game run on this 16 GB / 32 GB machine (the plan's line must show the reference values) and, if anyone can, one on a smaller card.Oracle and test data
None involved. Failure cases (
memplan.rstests): the reference machine gives the launcher's former values exactly; 8 and 12 GB cards and 16 GB of RAM give smaller, floored values; no cap exceeds the reference across a card x RAM grid; a switch overrides its value.Checklist
E_NOTIMPL), never a fake success. (Not concerned.)AI assistance: written with Claude Code. Claude Sonnet 5.5 wrote the change and its tests; Claude Opus 5.5 reviewed it, fixed the start-up order of the two card caps, ran the checks on my machine and wrote this description.
🤖 Generated with Claude Code
@LooperSalty on GitHub · 2026-11-26 00:06 UTC · original
Thanks — this is exactly the area we are working on (12 GB cards). It now conflicts with #265, which changed the launcher defaults after measuring on an RTX 4070 SUPER 12 GB:
VICTORY_CARD_WINDOWS_MB=1536,VICTORY_CARD_BUFFERS_MB=1536,VICTORY_LIST_POOL_MB=512,VICTORY_TEXTURE_ROOM_PERCENT=93. Could you rebase onto main, keep those as the reference for 12 GB, and update the comments that still cite a 16 GB reference card? On this card your plan() would give 3,072 MB of windows and 1,152 MB of buffers — under the ~1,189 MB of buffer copies we see in use — so a measured A/B would be welcome.@KainanP on GitHub · 2026-11-26 10:32 UTC · original
Test report for #256 on three adapters.
Does not merge cleanly onto current main:
tools/lancer_victory.ps1andtests/test_lanceur_victory.pyconflict with the launcher's fast set (#265 and later). The Rust side merges cleanly. For the Rust runs I took main's side of those two files. Setup: currentorigin/main(c4c93bd) merged with this PR, Windows 11,cargo test --lockedinthird_party/victory. Adapters: RTX 4060 Laptop (DXGI 0), Intel UHD 8086:a78b (16-lane waves, no FP64), WARP. The hardware adapter is picked by name through a local, uncommitted test hook and confirmed in its log; WARP for victory-gpu is--features diagnostics+VICTORY_D3D12_WARP=1. victory-gpu runs with--test-threads=1.victory-gpu --lib"main's 3" =
descriptor::host::tests::spans_say_the_next_start_and_the_lowest_level_viewed,indirect::tests::warp_card_fetch_copies_flagged_pieces_to_their_slots,indirect::tests::warp_card_patch_writes_the_masked_bytes_and_no_others. They fail on all three adapters on main too. The 4memplantests pass everywhere. No new failure.pytest tests/test_lanceur_victory.py: PR head (onaffaf15) 19 passed. Current main 25 passed. The PR's launcher test needs redoing on top of main's.What the plan's inputs are on this laptop (32 GB RAM, small probe calling
QueryVideoMemoryInfoon each adapter):plan)Notes:
D3D12_FEATURE_DATA_ARCHITECTURE::UMA(or the dedicated size) to cap the card side on such adapters.VICTORY_CARD_WINDOWS_MB=1536("4096 spilled VRAM on a 12 GB card") andVICTORY_LIST_POOL_MB=512.REFERENCEstill says 4096 and 2048. So with the launcher's line removed, a 16 GB card would go back to 4096 windows, and a 12 GB card would get 3072, which nobody has measured.-Qualityalso sets these five switches explicitly, so it still works, but the rebase has to decide which numbers the reference is.victory), defaults change on big machines: idle lists 128/256 MB → 2048/2048 MB, texture stage 192 → 512 MB, card buffers 1024 → 1536 MB. That may be wanted, but the PR body doesn't say it.memplan::current()callshost::host(), which creates the device on first use. If anything insidehost::createreachescurrent()(list pool, stage pool, window upload pool), that is a re-entrantOnceLockinit. The tests passed here, so I found no such path. A comment sayingcurrent()must not be called duringcreatewould help.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.