play: keep hand-set memory switches instead of clearing them #4014
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4014"
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 jeboy-nono on 2026-11-30T14:40:08Z.
Problem
prepare()clears every ambientVICTORY_*variable that is not inKEPTbefore it applies the start's own settings (
apps/victory/src/play.rs,"every other
VICTORY_...variable is cleared before the settings are putin"). The card-memory knobs were not in
KEPT, so values set in a launcherscript never reached the layer:
The play log of that start (
2026-11-29T23:07:42Z) had noVICTORY_TEXTURE_ROOM_PERCENTin its switch line, and the room line usedthe 90 % default:
That run climbed from ~6.2 GB to 8,546 MB on an 8 GB RTX 5060 in 18 minutes
and ended in
0x8007000E(no upload buffer).Change
Add the memory/room switches to
KEPT, next to the other hand-set values.A settings file or
--morestill overrides them, because those are appliedto the settings map after the ambient values are kept.
Test
RTX 5060 8 GB, Series S profile, 720p internal / 1080p output, DLSS
Quality,
play-xss.cmdas above (budget 6000, line 70 %,ROOM_REAL=1).The switch now reaches the layer:
Curve (end-of-minute
usedand texture copies from the room line):* the first minute of the "after" log is after the world's first frame, so
its t=0 is not the same point in the load as the "before" log's.
The "before" run reached 8,546 MB and failed with
0x8007000Eat 18 min.The "after" run plateaued at ~8,150 MB, kept rendering (15–20 fps) past
26 min, and produced no new
0x8007000E. One optional compute pipelinefails at load with the same key and
0x8007000Ein both runs; it isindependent of this change.
Honest limit of the measurement: the texture peak is the same in both runs
(~3.7 GB). The line controls how early admission stops, not the final
working set, and the non-texture footprint differed between the two runs.
So this is a switch-plumbing fix with a bounded peak in this test, not a
demonstration that the budget caps the process.
What this does not do
The budget is a ceiling on the texture queue's line, not a hard cap on the
process. On this title/card the non-texture footprint is ~4.4 GB (render
targets ~1.8 GB, card copies of title buffers ~0.8 GB, other/driver
~1.8 GB) and the texture working set is ~3.7 GB, so ~8.1 GB is the floor.
A 6,000 MB hard cap would require ~2 GB of textures to be absent.
We deliberately do not reach it by evicting textures that index slots show.
An experiment that trusted
VICTORY_SAMPLED_EVICTat the budget evicted theplayer's skin and left it white: the evicted copies then became first
uploads, and
first_upload_decisionrefused them at the whole-card budget(1,439 refusals in 5 s in that run), so they never came back. That
experiment is not part of this patch.
GPL
No derived code is added. The rejected experiment referenced the memory
stack by skornuta (
skornuta/victory-memory-stack,57fb136,GPL-3.0-or-later); it is not in this diff.
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T14:37:51Z.
On
a84fe88e, keeping the environment variable is only the first step. With frame generation enabled, the launcher still writes its automatic 80% texture-room value over an inherited explicit percentage. A blank saved budget also leaves the old ambient budget in place.0a53b5ce brings these memory values into the same settings map used at startup, before the saved file and
--set. It recognizes the inherited automatic-reserve marker when the F1 menu restarts the launcher.I ran the exact settings and environment code on Windows. With a lowercase ambient percentage of 68 and a 9,000 MiB budget, the author head used 80% with the automatic reserve. The patch used 68% and the 9,000 MiB cap. A blank saved cap cleared the environment value, saved and
--setoverrides took precedence, and a framegen-ready restart selected the automatic 86% value. The same fixture passed on the candidate merged with5fabb46e, where it also preserved an ambient 1,500 MiB soft limit. The staged asset check passed.The ambient VRAM-budget case is also reported in #4930.
Please keep the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change in.AI-assisted with OpenAI Codex.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.