8 GB cards: free space inside texture blocks counts as room, so eviction stops while the card stays over budget (ideas from ReVIctory) #3680
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by CuteBooty on 2026-11-30T03:42:28Z.
This is a report, not a PR: nothing below has been built or run here. It puts together one long session on an 8 GB card with a read of how another VIctory fork, ReTerryDavis/ReVIctory (GPL-3.0, tuned on a 16 GB RX 9070 XT), handles the same thing. It may be useful to whoever works on #2693, #3465, #1562, #2038 or #1968.
What we measured. RTX 3070 8 GB, v2026.11.29.05, upstream's launcher settings, frame generation off, DLSS Performance, Series S, plus
VICTORY_SAMPLED_EVICT=1,VICTORY_TEXTURE_ROOM_PERCENT=80,VICTORY_CARD_ROOM_FOR_TARGETS_MB=2048. One 65-minute story session, so this is a single reading:From 30 to 60 minutes the pool grew ~1.5 GB while the live copies in it grew ~70 MB. (Render-target host copies, #3420, levelled off at ~1.7 GB and are a separate part of the total.)
What the code does (read at
41adb5516).used.saturating_sub(crate::pool::texture_room()), resource.rs ~2973) and slot eviction (resource.rs ~3509).texture_room()is every free byte in existing blocks (pool.rs:712), however scattered.reclaim, pool.rs ~472-500), and both sweeps pick the oldest copies without regard to which block they sit in.VICTORY_POOL_FULLEST(fullest block first, PR #1551) drains sparse blocks only passively.VICTORY_BUDGET_PACKandVICTORY_ALLOCATOR_TRIMdo not touch the texture pool.What ReVIctory does differently. Its
crates/victory-gpu/src/vram.rsdescribes the same fault in its own earlier code ("by its count the card was at 81%"). The changes, all switches there:plan/usable, vram.rs ~309-333). The drain frees block by block, emptiest first, so whole blocks come back (drain_order, ~504). From 80% of the budget, sparse blocks are emptied on purpose (evacuation,VICTORY_POOL_EVACUATE, ~297).repack_order, vram.rs ~244;repack_sparse, resource.rs ~2745;VICTORY_POOL_REPACK). Their reason: in one session all 339 MB in 26 sparse blocks were held by slots, so draining alone could not free them.VICTORY_POOL_BLOCK_MB), as in open PR #1968 here.VICTORY_VRAM_GAP), and wake on the system's budget-change event. Here slot eviction's high line is clamped to the admission line, so withTEXTURE_ROOM_PERCENT=80it evicts right where admission stops.Their own figures, all on a 16 GB card: one play went from 94% to 90% of a ~11.8 GB budget with 32 MiB blocks plus evacuation. A model in their pool tests gives ~6% less card per texture byte for 32 MiB blocks and ~12% with evacuation. Nothing is measured for repacking. The costs they record: a repack costs a copy on the card (bounded at ~64 MB/s), evicted copies are uploaded again at next use, and one 4-minute session before the gap was added churned 9.4 GB of re-made copies.
Rough potential here (a guess from the numbers above, not tested). Items 1-3 together might recover something like 0.4-1.0 GB of the pool slack on this card. That would not bring a long session under budget on its own, because the #3420 render-target copies remain, but it would push the point where it goes over later. Item 1 looks like the smallest change: count only usable room and let the over-budget sweep keep going until whole blocks come back.
Related: #691 (1.9 GB free in partly used blocks, closed as stale), #1576, #2693, #3465, PR #1562, PR #2038, PR #1968, PR #2747. PR #2940 credits pool free space as room, which is the opposite direction and may be worth weighing against this. I did not find anything here for repacking, evacuation or
SetVideoMemoryReservation.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-30T03:42:38Z.
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T06:57:19Z.
Independent RTX 4060 8 GiB check on Windows 11. I added a temporary D3D12 test to the #2038 / #3766 stack and ran it in three fresh processes. Four resident 64 MiB heaps each held four 16 MiB RGBA8 textures. Returning half of every heap made 128 MiB of ranges reusable, with zero empty heaps and unchanged DXGI local
CurrentUsage(280,436,736 bytes). Returning the remaining two textures in one heap and dropping that heap reduced DXGI local usage by exactly 64 MiB, to 213,327,872 bytes. All three processes gave the same readings.The two v2026.11.29.05 Series S captures on this card showed a different slot-eviction state from the reported RTX 3070 case. I matched the texture-room line and last slot state to frame reports with ≥500 draws/frame within 50 ms. The last state was
evictingon all 330/355 over-budget frame samples with sampled eviction off, and all 119/244 with it on. This checks the reported state only. Those captures predate the whole-heap counters in #3766.The half-full case remains reusable under #3754's heuristic, so its credit and real DXGI usage are worth measuring side by side on the same route. At #1562 head
8b4b42b, block ordering lives inlet_go_idleandslot_evictstill usesoldest_covering. For a combined test with #3454, track whole heaps dropped and fast re-uploads along with DXGI usage. Analysis assisted by Claude Opus 5.5.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by CuteBooty on 2026-11-30T17:16:24Z.
@tyr0nsur thanks, that is the clean version of the check I could not do from play logs: half of every heap returned gives 128 MiB of "room" and zero bytes back in DXGI usage, and only a heap that is emptied and dropped gives its 64 MiB back.
A second, independent sighting of the same counting, from a different backend: the Linux/AMD Vulkan fork VKtory notes that its sweep line counts free space inside its texture blocks as free, "as the D3D12 path counts its pools'" (docs/learnings/vram.md). They measured 1.7-2.2 GB free inside blocks in one indoor scene, largest free range 138-256 MB, on a 16 GB card (docs/learnings/prison30.md). Their card never ran short, so it shows the size of the slack, not its cost; on 8 GB the same slack is what pushes the card over its budget late in a session.
Next from this side: normal play on v2026.11.30.01 (RTX 3070 8 GB, frame generation on), which adds
TEXTURE_SOFT_MB=3000and the spare-pool trim from #2633. I will report whether the growth after ~30 minutes changes, in the same numbers as before (card use against budget, texture pool, free room in blocks, every 5 minutes).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by CuteBooty on 2026-11-30T19:42:10Z.
First normal-play session on v2026.11.30.01, as promised above. RTX 3070 8 GB, 32 GB RAM, Windows 11, Series S profile, 1080p, DLSS Performance, frame generation x2. Upstream's play settings at
c71899d9e, plusVICTORY_SAMPLED_EVICT=1andVICTORY_RESIDENCY_PRIORITY=1. 28 minutes, mostly driving fast through downtown. Closed normally, no driver events.The game's own card use against its DXGI budget, compared with last night's sessions on v2026.11.29.05 (one with frame generation on, one off):
What the texture side looked like at the end (minute 28 today; minute 20 on .05 with FG on):
TEXTURE_SOFT_MBsweeps past its lineSo the pool is much smaller on this release, but about half of it is free space inside blocks. That free space still counts as room and still cannot go back to the card, which is the #3680 point. With half the pool empty in place, a block-aware drain or repack would have about 1.3 GB to give back on an 8 GB card.
Slot eviction is not what changed. In the first 28 minutes it let go a similar amount of textures that slots still showed: about 24.5 GB today against 28.5-30 GB on last night's three sessions, with 160-180 thousand re-made in each. The soft texture line never fired. What shrank the pool is not clear from this session.
Frames over 100 ms in the world: 35 a minute, against 62-89 last night. Median frame 56 ms. On screen: brief low-quality versions of textures while driving fast, no missing textures. The player's words were "a huge improvement over last night".
Caveats: one session.
RESIDENCY_PRIORITY=1was on. A game-streaming host (video encoder on the same card) was running this time and not last night; its memory comes off the DXGI budget, so the budget was about 150 MB lower today. Last night's .05 sessions were on foot more than in a car.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by CuteBooty on 2026-12-01T00:07:37Z.
Log lines behind the table above (v2026.11.30.01, minute 28, pasted as text; paths cut):
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by CLHelper on 2026-12-01T16:34:06Z.
A data point on what happens once
VICTORY_ROOM_REAL(on by default) says no room, from an 8 GB card. It may explain part of the "brief low-quality versions of textures" above.RTX 4060 Laptop GPU (8 GB, budget 7,189 MB), 32 GB, Windows 11; Series S, DLSS performance, frame generation off; a local diagnostics build on
c71899d9ewith the play defaults; the player standing still indoors, 200 s.The card sat within 256 MiB of its budget for the rest of the run, so
room()refused (resource.rs, thereal_budget_blocksbranch) while the queue's own count said room and about 1 GB lay free in texture blocks. What followed, with nothing moving:make_small,VICTORY_SMALL_WHEN_FULLon by default), and each texture pass grew them again into the free block space (draw.rs:4279-4284:texture_room() - GROW_KEEP_FREEwhile there is no room). The "made from their small levels" line went up by 70-140 per 15 s, every one of them "grown to their levels" again. On screen that reads as sharp, blurry, sharp.So the guard stops the queue from counting the free space as room, as this issue asks, and the free space is then used by
grow_smallanyway. A texture that fits the space already free in texture blocks takes no new card memory, which is what the 256 MiB margin protects, so it could be made whole there instead of small-then-grown. I have not built or run that; one run each.AI-assisted.