Slot eviction: what it did is in the frame-rate lines (#955) #972
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/972"
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 kibagami-nc on 2026-11-28T10:24:07Z.
Why
VICTORY_SLOT_EVICT=1has been on in the launchers since v2026.11.28.01, with the rest of the memory stack. Above 85% of the card's budget, it lets go of the host copies of idle textures, although title slots still show them, until the card is under 75%. A texture drawn again is then made and uploaded again.slot_evictkeeps counts of all that inSLOT_EVICTandSLOT_STATE:Nothing reads those counts. They are kept but written nowhere, and the one note it makes goes only to the in-memory trail. So a log cannot tell whether eviction was at work while textures came and went. #955 is such a report: textures glitching every 2 seconds "with the latest version", on an RTX 3060 12 GB.
The change
resource::slot_evict_line, called with the other frame-rate lines, writes them withVICTORY_SLOT_EVICT=1. It writes only for a second in which something was let go, put back to waiting, made again or given up, so a run without pressure gets no new line:Nothing that eviction does changes.
Tests
resource::tests::the_slot_eviction_line_tells_what_eviction_did:cargo test -p victory-gpu --lib --locked: 454 passed, 36 ignored.-D warnings, default and--all-features): nothing in the changed lines. It stops onmain's ownmanual_is_multiple_of(fixed in #665). With that lint allowed, both builds are clean.Not run with the game. In a run like #955's, the line shows whether the glitches line up with copies let go too soon.
No game files, dumps or extracted data are included.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by YUYING234 on 2026-11-28T10:33:00Z.
Two things from an 8 GB laptop on
63b902f, the second of which is a crash shape I have not seen before.1. The 540p row does not help on 8 GB, and I think the reason matters
I ran the new
SERIES S PICTUREat 960x540 (FASTEST) against the 1440p runs, same machine, same fresh save:So 141 MiB and about half a frame. The frame breakdown says why:
The copying is 52-94 MB a frame at both sizes. Dropping the picture by 2.7x in each direction moved that by nothing, so the resolution row is not the lever on this card - the per-frame copy of title memory is. It also matches what you wrote in
docs/findings.mdfor the 5080: the cost sits on our side of title memory, not on the card.2. A crash after the first "Focus" on the boat, and the fence number is suspicious
What the player saw: fresh save, prologue, driving the boat, first use of Focus - the screen flickers, then all of the water disappears, the boat drops through the world, and the game exits.
What the log recorded:
18446744073709551615isu64::MAX- the fence value the relay read is0 - 1, not a real one, so it could never reach 312701 and the wait could not end. I would guess at an underflow somewhere the relay takes one less than nothing (an empty batch, or a fence asked for before its first submission), but that is a guess from one number.Two things made this one worse than the earlier device removals:
taskkill /Freports "no running instance" while the PID still exists, and the working set (10.9 GB) is never released;nvidia-smihangs afterwards, so the card itself is wedged, not just our process. A reboot is the only way out.So the water vanishing is not a rendering choice that follows the crash: the water passes simply stop running when the fence wait never completes, and the title falls through the world because the water is what it was standing on.
The run it happened in
63b902f, Series S,VICTORY_MENU_RES=540, frame generation 2x, fresh save.VICTORY_RELAY=2is my own setting (it has been in my launcher since before this build), so if the fence underflow needs the relay, that is where to look. 23 minutes in, VRAM 6.8 -> 7.8 GB, frame generation had fallen from 95 % of samples to 45 % in the last few minutes - which may be the same stall starting earlier and the crash being where it finished.Happy to re-run with
VICTORY_RELAYat its default if you would rather know whether the relay is needed for it, once the machine is back.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T10:51:46Z.
Thanks for both. On the second, the number is not an underflow.
18446744073709551615(u64::MAX) is what D3D12'sGetCompletedValuereturns for any fence once the device is removed. The relay already treats it so (fence_reached), and the line prints it as if it were a value. What happened is the second half:0x887A0006, the card stopped responding and Windows reset it. Once that happens, every fence readsu64::MAX, so the water passes stopping and the fall through the world come after the hang, not before it.The process that could not be killed and
nvidia-smihanging are the driver not coming back from that reset. That is between Windows and the driver, which is why only a reboot helped.What made the card stop is the open question. Your note that frame generation fell from 95% to 45% of samples in the last minutes would fit something growing until it hangs.
VICTORY_RELAY=2is the launchers' default, so it is not a setting of yours apart from the defaults. A run without frame generation in the same place would tell whether it is part of it.On your first point: yes, at 52 to 94 MB a frame the copy of title memory costs the same at both sizes, so the picture size is not the lever on that card.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by YUYING234 on 2026-11-28T11:02:01Z.
Answering my own question from the comment above: I re-ran the same stretch with
VICTORY_RELAYunset. It still crashes, but not with the fence.VICTORY_RELAY=2(mine)RELAY=1)relay: fence 18446744073709551615 did not reach 312701host GPU device removed after 4 submissions sent ahead (VICTORY_RELAY=1) of 41 lists0x887A00060x887A0004and0x887A0006nvidia-smihangs, reboot by power buttonSo:
u64::MAXfor the fence value only appears withVICTORY_RELAY=2, and it is worse than the crash it accompanies: the process cannot be reaped (taskkillsays no such instance while the PID holds 10 GB), and the card itself stops answeringnvidia-smi, so the only way out is holding the power button. Even if the title crash is fixed, that one is worth having on the list.What the panel said a moment before the default-relay crash:
That is 400 MiB over the budget with 7.9 GB of the PC's memory shared with the card, the same shape as every other crash tonight (7.7-7.8 GB peaks on all of them). Both runs sat there for minutes before ending, so it is not a spike that kills it.
I can run the same stretch with
VICTORY_MEMORY_CARD_MBor the 540p row and the relay at default if you want the memory side of this narrowed while the crash itself is being worked out - say which and I will.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T11:20:56Z.
Thanks, that pair of runs is useful. One detail:
victory.exe playsetsVICTORY_RELAY=2itself, so 2 is what most people run, and your earlier runs were on the launchers' default. The layer's own default, when nothing sets it, is 1, which is what your second run had.On what you found:
taskkillcannot end is stuck inside the driver, andnvidia-smihanging says the driver itself did not come back from the reset. The relay's thread waits in an ordinary wait that can be killed. If it happens again with relay 2 and never with 1, that would be worth its own issue.So the memory test is the one I would run: the same stretch, relay at default, with
VICTORY_TEXTURE_ROOM_PERCENT=70invictory-settings.txt(with frame generation on, the launcher sets 80). If the card stays under its budget and the run survives, the hang is the memory.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by YUYING234 on 2026-11-28T11:21:43Z.
Two corrections to what I wrote above, both my mistake, and one of them changes the conclusion.
1. My "540p" numbers were not 540p
The Series S picture row is read from
victory-settings.txt(play.rs,saved("VICTORY_MENU_S_RES")), not from the environment, and I had been passingVICTORY_MENU_RES- which is the Series X key. So the run I reported as 960x540 was in fact the default 720p / QUALITY (scene at the quality scale (0.6666667)in its log). The comparison I gave you was 720p against 1440p, not 540p.The real 960x540 (performance, 0.5 scale), on the default launch settings:
Peak is the same 7.8 GB as every other configuration tonight. So the conclusion holds but for a better reason than I had: at 960x540 the card still ends up 1.4 GB over its budget, and the frame rate is no better than at 1440p - the per-frame copy volume (52-94 MB) does not care about the picture size.
2. The fence underflow is not specific to
VICTORY_RELAY=2I said it was, because my control run at the default produced the generic
device removed after N submissionsinstead. This run settles it the other way:and the log for that same run says
VICTORY_RELAY=1throughout (the relay per frame (VICTORY_RELAY=1): 2.1 flights landed...). So the fence underflow happens at the default relay too - it is a bug in the relay's fence accounting itself, not one that needs relay-2 to show up. What differs between the two runs is which of the two failures gets reported first, not whether the relay is involved.Where this leaves the crash
Every crash tonight has been at the same place and the same state:
进入专注状态 以找到包裹is on screen, then it goes),Five configurations, five crashes: 1440p, 1080to1440p, 960x540, relay 1 and relay 2. I have not found a setting that avoids it, and I do not think there is one on this card until the memory side is solved - the picture size only changes how much of the hurt is in the render pass.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T11:50:20Z.
Thanks for the corrections. The 540p run settles that the picture size is not the lever on that card.
On the fence: that run fits the same explanation, not a bug in the relay's counting.
u64::MAXis what every D3D12 fence reads once the device is removed, whatever the relay mode, so with relay 1 it shows the same way. Whichever wait first sees the removed device prints it. #993 changes the line to say the device was lost before that value, so the next log won't read as an underflow.That leaves what you found: five configurations, the same place (the boat, the first Focus), and VRAM 1.4 GB or more over the card's budget every time. KIFIR4KK has been through a matrix of settings on the same card class in #1032 (summary on #946). With the
#609target and texture-room settings (Targets=1280,TexRoom=85%), their "no room" samples fell from about 90 to 3. That is the memory side to try on yours, at the default relay.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by YUYING234 on 2026-11-28T15:46:47Z.
You are right and I withdraw the claim. I called it an underflow because the value looked like one;
u64::MAXbeing what any fence reads after the device is removed is the simpler explanation and it needs no bug. Two runs printing different faces of the same removal is not evidence of a relay fault, and I should have asked what that value means before writing it up as a finding. #993's wording change is the right fix - "the device was lost before this value" says what happened.On the memory side, I have the two switches and the line to check them against, so this is ready to run when the card is free:
VICTORY_CARD_ROOM_FOR_TARGETS_MB=1280(default 3,072, clamped at 8,192)VICTORY_TEXTURE_ROOM_PERCENT=85(default 90, clamped 50-97)Our baseline, from a Series S 626-balanced run on the 4060 Laptop, is this line:
So the reserve is
1701 MBat that moment against a 3,072 MB cap, and the line we cross is 80.0 %, not 90 - the percent only replaces the formula when the variable is actually set. After the change I expectkept for render targetsto fall to 1,280 or below and the parenthesis to read85.0 %, which is how I will know the settings landed rather than assume it.One caution I want to state before the result, so I do not repeat the mistake above: these two settings may pull against each other.
Targets=1280takes about 420 MB out of the reserve, butTexRoom=85raises the line from the formula's 80 % to 85 % - 5,531 MB instead of 5,205 MB - which admits more textures, not fewer. KIFIR4KK's "no room" samples falling from 90 to 3 is a count of stalls avoided, and that is not the same measurement as a lower peak. Our crash is0x887A0006with the card at 7.7-7.8 GB, so whether fewer stalls helps it is something I do not know yet.What I will report is both numbers per run: the peak VRAM, the
no roomcount, and where the run ended. If the peak does not move, that is a result too and I will say so rather than reach for a third setting to make the story work.Separately, and possibly relevant to the same 8 GB wall: on Leonida's Vulkan runtime (the recompiled tree, not this one) the same card renders the title's first-run pages at 53-59 fps with about 2 GB in use, against 7.7 GB here. Different backend and a different amount of the world loaded, so it is not a fair comparison yet - but it is a large enough gap that the memory figure here looks like something this path adds rather than something the title needs.