fix: the card room kept for render targets follows the card's budget (8 GB cards get textures) #536
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/536"
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?
Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-27T17:52:28Z.
Change
resource::targets_room_keptheld a fixed 3,072 MB (VICTORY_CARD_ROOM_FOR_TARGETS_MB) of the card out of the texture queue's reach until the render targets are made. That value was measured on a card with a ~10,200 MB in-world budget (runs 193-198 in the comment). On an 8 GB card the system gives 6,700-7,200 MB, so the reserve takes up to half of the 90 % thatroom()allows, and textures picked by index wait for most of the game (black textures that come back).The reserve now follows the budget that
card_use(used byroom()andlet_go_idle()) already reads:reserve = max(512 MB, 3,072 MB − (10,000 MB − budget) / 2). It stays 3,072 MB from 10,000 MB up and when the budget is unknown.VICTORY_CARD_ROOM_FOR_TARGETS_MBstill overrides it exactly as before (0 = none, capped at 8,192). Nothing else changes.Where the numbers come from. avatarmanz/VIctory-7900XTX#407 (Jesper-Andersson, RTX 2070 SUPER 8 GB, budget 7,221 MB at the start and 6,680-6,981 MB in the world, about two minutes in the world per run, measured in game). That repository is no longer reachable, so here are the figures as I recorded them:
A second report there (RTX 3050 Laptop 4 GB) found the texture copies stuck at the floor with 3,072.
A flat share of the budget can't fit both measurements: 1,280 on ~6.9 GB is 18 %, and 3,072 on ~10.2 GB is 30 %. A line from 512 up to 3,072 at 10,000 MB fits both and keeps every 10 GB+ budget where it was. On 8 GB it gives 1,412-1,562, a little above #407's 1,280, because going over the budget did more harm than a few lack-of-room passes.
Interplay with our presets and PRs.
VICTORY_CARD_ROOM_FOR_TARGETS_MB, so it gets the new reserve automatically. ItsVICTORY_TEXTURE_ROOM_PERCENT=85lowers the line itself, and the two stack (numbers below).card_use, and this change only adds the budget argument to it.card_useortargets_room_kept. Its tests go at the end ofresource.rs's test module, and the new test sits next totexture_floor_scales_with_vram_budget, so they shouldn't conflict textually. The two do different things: #506 shrinks the textures, this lets more of them be made.Linked issue: Refs avatarmanz/VIctory-7900XTX#407 (repository gone).
Verification
RTX 4060 Laptop 8 GB, Intel UHD (a78b), WARP;
third_party/victory,CARGO_TARGET_DIRoutside the tree.Device check on the RTX 4060 Laptop 8 GB (local
#[ignore]test, not in this PR). It makes 64 MiB committed textures one by one on the real device and evaluatesroom()'s line (card_usewith the realcard_room_kept()= 512 MB, targets not made yet) with the old and the new reserve. Budget 7,188 MB; same result in two runs each:VICTORY_TEXTURE_ROOM_PERCENTIn both cases the card stays well under its budget at the stop, with room left for the targets. On the Intel UHD (shared budget 15,483 MB) both reserves are 3,072 and close at the same point, which is expected.
Oracle and test data
resource::tests::the_room_for_targets_follows_the_budget. It checks the budgets in the table, the switch over the budget, that on 8 GB the reserve sits between 512 MB and a quarter of the budget, and that on 4 GB the floor plus the reserve stay under 80 % of the budget. It fails with the old fixed 3,072 (shown above).Not measured: I haven't run the game with this change. Request: could someone on an 8 GB card (RTX 4060 / 3070 / 2070 class) run an A/B: this branch against
main, LowVram preset or not, two minutes in the world each, and post the log's "passes that made none for lack of room", the "the card: N MB in use of a budget of M MB" lines, the median frame, and whether textures go black? SettingVICTORY_CARD_ROOM_FOR_TARGETS_MB=3072on this branch gives the old behaviour for the B side.Checklist
E_NOTIMPL), never a fake success. (n/a)6e76be9:Source:andCo-authored-by:in the commit, row inTHIRD_PARTY.md.Made with AI assistance (Claude Code, Claude Opus 5.5): code reading, the change, the tests and this description. I ran the tests and the device check on my machine.
🤖 Generated with Claude Code
Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-27T19:45:22Z.
Full
victory-gpusuite on this branch (single-threaded,cargo test -p victory-gpu --locked -- --test-threads=1):VICTORY_D3D12_ADAPTER=Intel)anisotropic_heap_sampler_reads_the_requested_mip, which fails the same way onmainon this iGPU (seen on #506/#443 runs too)VICTORY_D3D12_WARP=1,--all-features)AI use: Claude Code (Claude Opus 5.5).