gpu: size the render targets' room by the peak they have held, not a flat 3 GiB #76
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/76"
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 starnotes-xj on 2026-11-27T16:45:20Z.
What this fixes
On an 8 GB card the SeriesS / SeriesX2 profiles (720p scene) render black faces on every NPC and leave the phone's screen empty, while the card is less than half used. The cause is in the room kept for render targets:
VICTORY_CARD_ROOM_FOR_TARGETS_MBkeeps a flat 3,072 MiB, and it is only given back once the targets hold half of it (1,536 MB) and have not grown for 20 s. A 720p world's targets never reach that: they hold ~390 MB for the whole run, so 2,675 MB stayed reserved for targets that never come and the texture queue refused new textures with the card 41 % used. The skin textures of passers-by, the coffee shop's waitress and the phone's screen were never uploaded.The change
crates/victory-gpu/src/resource.rs: the room is sized by the most the targets have held this run — half as much again, at least 256 MiB, never more than the switch's amount.targets_room_kepttracks the peak in a static and calls it;VICTORY_CARD_ROOM_FOR_TARGETS_MBis set, the old flat rule is used unchanged, so existing tuning behaves as before;targets_keptand its test stay for that path;room_for_targets_follows_their_peak(the 390 MB figure is the measured one).Measured (RTX 4060 Laptop, 8 GB,
-SeriesS -Dlss quality, release build)out of VRAMWith the fix, passers-by, the coffee shop's waitress, the street and the phone's bezel all render correctly, and the card no longer goes over its budget (the hand-cut workaround, releasing the reserve and lowering
VICTORY_TEXTURE_ROOM_PERCENTto 78, overfilled at 6,895 MB with 43out of VRAMevents).A 1440p world's peak of 2.9 GB still gets the switch's full 3,072 MB, so the profile the numbers were tuned on keeps what it had.
cargo test -p victory-gpu --lib room_for_targets→ 2 passed.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cride9 on 2026-11-27T16:53:52Z.
sup, tested it with a desktop 3050 and ryzen 5 5600 32gb DDR4 system ram.
Got around 25fps avarage with lucia inside the prison. And around 18-22fps on the water.
My claude merged it and it looks like working (but idk)
-Build release -SeriesS -Dlss performance -Fps 60 -More @{VICTORY_THIN='0'; VICTORY_JOIN_PARTS='1'}Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Pierrespeick on 2026-11-27T22:09:51Z.
Additional test on an 8 GiB NVIDIA Wave32 card, with
0f0ada1as the base for both builds. I applied05a269don top for the second run. Both builds used diagnostics, Series S, DLSS off, frame generation off, and separate copies of the same starting save.no room: 6,474 MB accounted against its 6,113 MB threshold, including 1,584 MB kept for render targets.no roomin some scenes and showed intermittent black or coloured surfaces.The patched run reused the baseline shader and pipeline cache, so this is evidence for the budget and rendering behaviour. A same-scene warm-cache FPS comparison is still needed. Both sessions ended by closing the window. This summary uses aggregate diagnostics and visual observations. Prepared with Codex assistance.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by CuteBooty on 2026-11-28T01:51:37Z.
Data from an RTX 3070 8 GB at 1080p that shows the same thing this PR describes, at one spot in the world: Jason's house (the interior with the terrarium, and its outside walls). I have not built or run this PR's code; these are log figures from builds without it.
Setup: RTX 3070 8 GB (DXGI budget 7,250 MB at start, 6.3-7.0 GB in play), Ryzen 7 5800X3D, 32 GB, Windows 11. Series S, 1920x1080, no DLSS, no frame generation, ray tracing off, built from source, started from my own script (not the launcher; switches on request).
VICTORY_CARD_ROOM_FOR_TARGETS_MBnot set, so the flat 3,072 MB rule.Three short runs, same save, standing in and walking around that house. All figures are from the
the texture queue's room:line (one sample every 5 s).64d4931b364d4931b3,VICTORY_BUFFERS_AHEAD=0f3534e6b0brought up to date although the card has no roomlinesWhat I read from it:
5782 MB in use - 818 MB free in texture blocks + 106 MB kept for card copies of title buffers + 1690 MB kept for render targets = 6760 MB against a line of 6247 MB (90.0 % of a budget of 6942 MB): no room, new textures wait.By this PR's rule, a peak of about 1,380 MB would keep about 2,070 MB less what the targets hold, so roughly 690 MB instead of 1,690 MB at that spot.
The same spot with
VICTORY_CARD_ROOM_FOR_TARGETS_MB=2048(the old flat rule with a lower amount, so the release point is 1,024 MB;64d4931b3+ PR #560,VICTORY_BUFFERS_AHEAD=0, otherwise as run B; one run of 14.3 minutes):brought up to date although the card has no roomlines a minuteout of VRAM,E_OUTOFMEMORY, ERROR linesSo with the reserve released the queue has room where it had none, and the card then really fills: 48 of the 62 remaining "no room" samples are the card at its budget (in use 6.75-6.8 GB, above the DXGI budget in 18 samples), not the reserve, and they get more frequent as the run goes on. One run; I have no by-eye verdict on the walls and floor for it. The one thing noticed by eye in that run was the player character's face skin turning flat white-grey at the house; I don't know whether that has anything to do with the fuller card.
Caveats: short runs in one sitting, one machine; run A rebuilt its shader caches, the others had warm ones; A / B / D and C are different bases, and D carries PR #560. Not tested: this PR's code. I have photos of the two interiors but am not attaching them.
Separate from this: the blue-white glow on the table and floor in the same room on
64d4931b3looks like the indoor reflection problem in #468 and #507 (same house), not memory.Measurements and this report were prepared with an AI assistant (Claude Code); the runs were played on my machine.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by starnotes-xj on 2026-11-28T07:21:18Z.
Another 8 GiB datapoint, and the root cause of the "characters have no faces" report (#100) — it is three problems stacked, and the last two are why the pass looked unfixable on 32-lane hosts.
Card: RTX 4060 Laptop 8 GB, 32-thread CPU, 2560x1440 output, Series S, DLSS Quality, frame generation off.
1. The pass was left out by the launchers. Both
scripts/play-foxhound.ps1andapps/victory/src/play.rssetVICTORY_LEAVE_OUT=02384a60fda6f2d0,731a39171b568298.02384a60fda6f2d0isvfx_triangleClip:CS_DefragHeap_ComputeRelocations, which places the faces' meshes. Left out, eyes, teeth and hair still draw and the face does not, so a character reads as a black head. The F1 item calls it "DECAL DEFRAG", so nothing says it costs the faces (#490 makes the launchers leave out heat haze only).2. Not left out, it is refused on wave32 hosts:
no wave32 lowering for this wave64 program. Part of that was a regression of64d4931: its loop retry is given whenw <= *wave, so when both attempts still want 64 lanes the retry is taken anyway andlower::take_needs()drops the blocks the first lowering named — which are exactly whatwidenwidens, sowidenstops at 64 (#560).3. What is left goes to the split-wave64 fallback (#259), which only runs after every other form.
With all three, the log goes:
and the faces come back in the cafe cutscene (the child and the man in the pink shirt). The only program still refused in a whole run is
6b82bc7d22016cb5(the meshlet collector, groups of 1024, LDS past 32 KiB), which #101 names as still open.On top of that, #669 (a first upload admitted just over the room line within a 5 s window, at its real bytes) is worth pairing with the reserve fix here: on this card it took the same scene from 12.6-14 fps and 45-47 ms of preparing a frame to 17.9-18.0 fps and 31.5 ms — so the reserve fix and the admission fix are complementary, not alternatives.
Our save point with all of it is
save-2026-11-28-facesin starnotes-xj/VIctory-NVIDIA (latest main + #76 + #490 + #469 + #560 + #259 + #669).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by urielbeaupre on 2026-11-28T12:27:19Z.
Same finding on a 12 GB card, so this isn't only an 8 GB problem. RTX 4070 Ti 12 GB (budget about 10.4 GB), Series S profile,
-FrameGen, so the texture line is 80%. I tested my own local fix for the same cause (let the reserve go once the targets pass 768 MiB and settle, not at half of 3 GB). Your peak-based sizing covers the same case, so I'm not opening a second PR.On main, the room kept for render targets never went: it stayed at 1,772–1,951 MB for the whole run. A 720p world's targets level off at about 1.0–1.3 GB, under the 1,536 MB they would need to reach. A typical line from the log:
Same save and route, 3 minutes each:
One more thing your peak sizing should handle, which I hit with the plain release: after the targets had settled, a new scene grew them by 64 MiB, and the full 1.8 GB came back for 20 s. Sizing by the peak avoids that.
Fps doesn't change here (the CPU is the limit). The gain is in the picture: objects that stayed black with frame generation get their textures.
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-28T12:56:29Z.
Another independent 8 GB Linux data point for the reservation discussion (configuration-only, not a test of this PR's patch). RTX 4060 desktop, 16 GB system RAM, NVIDIA 620.73.04 / GE-Proton11-14, publisher release v2026.11.28.01 (
63b902fe). Series X1080to1440, actual 2560×1440 swap chain, DLSS/FG off, full write-back, default launcher feature omissions retained for this diagnostic. Both launches use the native compiler from the #357 comparison, independent fresh prefixes, identical copied engine shader/pipeline/book cache manifests, fresh external driver caches. The only requested renderer setting changed wasVICTORY_CARD_ROOM_FOR_TARGETS_MB=2304(control unset, default 3072). No change to texture detail or render settings.Both had zero tracked E5005 warnings, no recorded out-of-VRAM/E_OUTOFMEMORY/device-removed markers, no 128 MiB floor stop, and no recorded kernel GPU fault. Minimum available host RAM was 325052 KiB vs 328668 KiB. The prior two cold runs also had target-reserve-dependent refusals in all denied periodic samples (31/69 with the Wine compiler, 25/53 with the native compiler).
These figures confirm that the reserve still determines many admission refusals in this Linux loading workload, even at the 2304 override. The increased actual VRAM use is important: the hypothetical subtraction is not a recommendation to remove reservation, and the source documents larger future 1440p target demand. In the existing flat policy, changing the cap also changes the half-cap settlement threshold (1536 to 1152 MiB) and affects eviction eligibility, not merely upload admission. Both runs still had hundreds of outstanding pipelines, substantial drops, and variable loading frame times; neither has a verified rendered gameplay scene or matched visual-quality/FPS result. I have not tested the peak-based patch here. Different progression and rounded periodic accounting limit causal comparison of session-level counts. This is evidence for testing adaptive reservation, not a claim of fixed black textures or a speedup.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).