gpu: size the render targets' room by the peak they have held, not a flat 3 GiB #76
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!76
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@starnotes-xj on GitHub · 2026-11-27 16:45 UTC · original
starnotes-xj:fix/targets-room-peak→main· +49 −1 · 1 files · 1 commits · openWhat 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.@cride9 on GitHub · 2026-11-27 16:53 UTC · original
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'}@Pierrespeick on GitHub · 2026-11-27 22:09 UTC · original
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.
@CuteBooty on GitHub · 2026-11-28 01:51 UTC · original
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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.