Residency: VICTORY_FIRST_UPLOAD_GUARD=1 stops first uploads that keep an 8 GB card past its budget (off by default) #1944
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1944"
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 RomanFama592 on 2026-11-29T03:42:57Z.
Related #946, #1918
What it changes
VICTORY_FIRST_UPLOAD_GUARD=1makesresource::first_upload_decisionrefuse, while DXGI says the card is at or past its budget, the two kinds of first upload that kept an 8 GB card growing past it:Off by default; nothing changes without the switch. With it, nothing changes under the budget either, or just past it with free ranges to spare.
Past its budget Windows pages the card's memory, and the frame rate falls with how far over the card is. The cost: a refused slot shows the neutral texture until there is room, so in a new place floors and walls can stay grey for a few seconds, until eviction lets go of the old place's textures.
docs/8gb-cards.md: why the budget decides the frame rate on these cards, this switch andVICTORY_RESIDENCY_PRIORITY(#3804), what is still open (linked fromdocs/windows-memory.md).How it was tested
VICTORY_FIRST_UPLOAD_GUARD=1VICTORY_RESIDENCY_PRIORITY=1(#3804) as well, the same card went from 3.4 to 14.9 fps.cargo test -p victory-gpu --libon this head (current main): the test target does not build on current main (twocard_passcalls inhost.rs's tests miss their new last argument); with those two calls given[0; 3]locally, 1115 passed, including the newpast_the_budget_a_texture_of_unknown_size_is_not_admitted, and 2 failed that fail on current main too (shader_cache::tests::every_switch_of_the_translator_is_in_the_key,list::thin::tests::bindings_record_no_work). Clippy: no finding in the lines this changes.Checked for overlap
VICTORY_RESIDENCY_PRIORITY): which memory Windows pages first; independent of this (different files). This was part of it before.View::Shadertextures in the admission, the better fix for the one-byte case; this only refuses them past the budget, so the two fit together.first_upload_decision(a small rebase for whichever lands second).🤖 Generated with Claude Code
https://claude.ai/code/session_01WiREjDTE7b3pRCmCoV3FDx
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kraiy404 on 2026-11-29T06:35:18Z.
Tested on the same card you measured on: RTX 4060 Ti 8 GB.
Setup: i5-13400F, 32 GB, Windows 11 26300, driver 621.40.
Series X, 2560x1440 output, DLSS quality, DLSS frame generation 2x, texture room 72%.
Base:
63b902fe1plus #541 (UI) and the key-mouse commits, then your PR cherry-picked on top(it applies with two conflicts in resource.rs and host.rs; see the porting note at the end).
Before (same build, same place, without your PR):
After:
"render targets, depth and memory shaders write: high residency priority (VICTORY_RESIDENCY_PRIORITY=1)"
Porting note, in case it helps the branch: onto that older base your commit needs three symbols that
base does not have yet.
mapped(). I gave the sync path its own static (ASIDE_SYNC) rather than hoisting mapped()'s.
free bytes of the texture blocks - more permissive than yours, and only read by the first-upload check.
From my side: this is the first build on this card where frame generation actually produces frames
with the budget respected. It feels much better to play than any build I have had so far.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T07:03:05Z.
Thank you for testing on the same card, and for the porting notes, they are useful. It is good to see a second RTX 4060 Ti 8 GB with a different CPU (i5-13400F) land on the same result. The frame generation result is new to me: in my runs frame generation was the first thing to push the card past its budget, so I had left it off. If you don't mind, I'd like to add your numbers, with credit, to the "How it was tested" section.
One note: the build you tested still had the residency priority as opt-in (
VICTORY_RESIDENCY_PRIORITY=1). It is on by default now, and=0turns it off.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Roybill203 on 2026-11-29T07:17:51Z.
Tested on an RTX 4060 Laptop 8 GB (7,188 MB DXGI budget, Ryzen 9 7945HX, 15.7 GB RAM, driver 621.24, Windows 11 build 26300). Built from
main@568c5e5plus this PR applied cleanly (all 4 files). Yourdocs/8gb-cards.mdis the most useful document I have read on this problem — the table of fps against how far past the budget the card sits predicts what we saw before we had a fix.What this PR fixed for us
The OOM loop is gone. Before it,
--series-s --dlss performanceproduced 13,461no shared bufferrefusals of 6,291,456 bytes in 8 seconds, and the run never got past the loading screen. After it, the same profile produced 1 to 3 OOM lines in total and reached the world at frame 29,533. Nothing that looked like your two cases recurs.What is left on our card, and it is not memory
The runs now stop differently. The last one (Series X, DLSS balanced,
VICTORY_RESIDENCY_PRIORITY=1,VICTORY_VRAM_ADMIT=1at 92/84 — the gate is ours, see below) shows:So
0x8007000Eis followed by0x887A0005DXGI_ERROR_DEVICE_REMOVED. The whole run is 64 seconds and the longest frame is 9,155 ms, so this is not the 60 sTdrDelayfiring; the system log carries no Display or nvlddmkm event for it either. The 9 s frame is the thing that stands out, and it lands while mesh pipelines are still being made:The residency priority A/B did not reproduce for us
This is the part I would most like your reading on. Your table has
VICTORY_RESIDENCY_PRIORITY=0at 3.4 fps / 181 ms and the default (on) at 14.9 fps / 2.3 ms. On our card the switch removed every OOM and then ended the run withDEVICE_REMOVED2 seconds into the world:#1944only=10x8007000E, frame 31,336#1944only=10x8007000E, frame 35,120#1944only=10x8007000E, frame 30,306#1944+ priority=10x887A0005, 64 s, longest frame 9,155 ms#1944+ priority=10x8007000E+DEVICE_REMOVED, frame 27,858The one that gave the expected 0 OOM is also the one that died with
DEVICE_REMOVED, and it died sooner in wall-clock terms (64 s against about 12 minutes). My guess, offered as a guess: with every render target, depth and UAV atHIGH, the textures are what Windows pages, and our 15.7 GB of RAM gives the pager less to work with than the 64 GB in your test rig — your doc says the card stays 150-780 MB over after the change, and paying for that out of system memory is what the 9 s frame might be. If you have a run on a 16 GB host I would very much like to see whether the p99 tail looks like ours.Two things that may be worth knowing
VICTORY_RESIDENCY_PRIORITYis off by default in the code as merged, though the PR text says "on by default".host.rs:So anyone reading the PR and expecting the A/B by default will silently get
=0. Either the comment or the description wants updating.The one-byte case looks like it is still reachable through a path this PR does not see. Our runs still log first-upload admissions while the card is at the line, up to
so_far=3,750:#1677's author named the same family as "Defect 3, the stalememorysnapshot across a texture pass" — the decision reads numbers taken before the pass, so late-pass admissions ride stale ones. That matches what we see: refusing and climbing at the same time.What we ran, for anyone reproducing
VICTORY_VRAM_ADMITand the two percentages are our own addition, not yours: a residency gate on the card's LOCAL segment throughIDXGIAdapter3, high/low marks with hysteresis, that withholds speculative uploads only. Our first version gated the drawing path too, and that was a mistake worth recording — the gate fired once at 92 % (used 6,402 of 6,956 MB) and never cleared, because refusing an upload the title is drawing with frees nothing; within 50 s the queue reached 16,098 due with the oldest 1,648 frames old and interiors lost their lighting. With it moved to speculative work only, the queue ends at 145-1,573 due and the picture is clean. It is not what stops your OOM though — sampling once a second cannot see a 2 GB step inside one frame, which is the same stale-snapshot shape as Defect 3.Logs are 3-7 MB each and I can attach any of them or put them in a gist.
Log analysis done with an assistant; the runs and the numbers are mine.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kraiy404 on 2026-11-29T07:25:03Z.
Sure, go ahead - credit is fine.
On frame generation: with the first-upload guard in place it works at 72% texture room,
and it was the difference between "on but generating nothing" and "24 frames shown".
One data point that may matter to you: on the official latest main (
568c5e5) with thesame PR, frame generation still fails there - but not because of your guard. That base
counts the budget lower (6,922 MB where the driver reports 7,181), so the 72% line falls
to 4,993 MB and the card sits ~1 GB over it permanently. On
63b902fe1the same settingssit inside the budget. So the newer base's budget arithmetic is worth a look.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T09:25:36Z.
Thank you for the careful runs and the write-up, it is the first test of this on a laptop and on 16 GB of RAM.
You are right that the code you built had the residency priority off by default: that was the first revision of this PR. A later commit turned it on by default, and the PR text was written for that one. Your result made me change it again: the priority is now on by default only on a PC with 24 GiB of RAM or more, and stays off on yours unless
VICTORY_RESIDENCY_PRIORITY=1is set. The log says so once at the start. My runs were all on 64 GB, so I have nothing to show for a 16 GB host yet, and your guess (with render targets held, the textures are what gets paged, and 16 GB leaves the pager little room) is the most likely reading I have too.If you have time for one more pair on the current head, the most useful would be without
VICTORY_VRAM_ADMIT, so the two changes are not mixed: the default (now off on your laptop) and--set VICTORY_RESIDENCY_PRIORITY=1, same profile and route. The play log of theDEVICE_REMOVEDone would help most; a gist is fine.On the late admissions over the room line: that is the black-face fix's "just over the line" path, which this PR does not narrow under the budget, and #1677's stale-snapshot defect is a good explanation of refusing and climbing at once. I'd rather leave it to that PR than widen this one.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T09:31:47Z.
Thanks, added to "How it was tested", with credit.
On the budget: with the same base (
568c5e5plus this PR) my card reports a budget of about 7,180 MB, so I don't see the 6,922 here. DXGI's budget is what the OS leaves the process, and it falls when other programs hold video memory (browsers, overlays, a second game window), so a ~260 MB difference between runs or machines can come from that rather than from the base's arithmetic. If you see 6,922 again, the log'sthe texture queue's room ... budget of N MBline and what else was open at the time would tell the two apart.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T09:37:43Z.
Status update
main(including #1771, #1888 and #1763), and the residency priority is now on by default only with 24 GiB of RAM or more (see the reply above). Tests pass on the merged head.VICTORY_IMAGE_HOLD), so every build sees the same scene. Then the before/after for this PR on the merged base, and the results for #1968 and #1926 on this card.mainwith this 8 GB card, as asked there.CPU-side work for two-die Ryzens (the idea from #730) will go in a separate PR, so this one stays about 8 GB cards.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Roybill203 on 2026-11-29T10:30:27Z.
Read the status update — the in-game time of day result explains a lot of what confused us, so thank you for writing it down before posting numbers. We had been comparing runs at different hours without knowing it.
The pair you asked for
We have the settings in place and will run it tonight: Series X, DLSS balanced,
--res 1080to1440, frame generation off, noVICTORY_VRAM_ADMIT, same route both times.VICTORY_RESIDENCY_PRIORITYreads 0 on our laptop, as you say it now should below 24 GiB.--set VICTORY_RESIDENCY_PRIORITY=1.We will also try to hold the world clock so the two are comparable at all; our runs so far were not, which is exactly the defect you found. If
VICTORY_IMAGE_HOLDtakes an hour we will use the same one for both and say which.What we already have, which may be the same thing you are looking for
Three runs on
568c5e5+ this PR, all withVICTORY_VRAM_ADMIT=1(ours, so not the clean pair — read them as a first look only):=10x887A0005DEVICE_REMOVED, 64 s, longest frame 9,155 ms=10x8007000EthenDEVICE_REMOVED, frame 27,858=10x8007000E, frame 31,336The first row is the one whose log you asked for. It is 2.05 MB. The sequence at the end, in order:
Two things we would like your reading on, since you have the card and the counters:
The 9,155 ms frame is not
TdrDelay. OurTdrDelayis 60 s and the whole run is 64 s, and the Windows System log carries no Display or nvlddmkm event around 06:13:08. So whatever removes the device here is not a timeout we can raise. The frames just before it are the first ones that actually draw the world (79 draws), which is also where your#1962reporter sees his failures — different error, same moment.The read-backs immediately before the removal. Two
texture to buffer copy (a read back)of5x1 f2and1x1 f2complete withOk(()), and then the device goes.#802's reporter independently noticed the same shape in his prologue crashes ("the last thing before the crash is a read back of tiny textures ... sources 5x1 f2 and 1x1 f2, copies=1..6 — runs that survive it complete 8+8 of these"). Ours stops at 9 and 10. If those two numbers mean anything to you, that may be a more useful thread to pull than the priority switch.On the budget difference
You are right that it is DXGI and not arithmetic — we had Chromium and the harness open on the runs that showed 6,922. The last clean run reports 6,984-7,006 MB with nothing else open, which matches your ~7,180 within what other processes take.
Two notes that may save someone else a night
VICTORY_RESIDENCY_PRIORITYwas off by default in the code as we pulled it, while the PR text said "on by default". Your 24 GiB rule is a good resolution and we have nothing to add to it, only to say that anyone reading the earlier text would have silently measured=0.#1962looks like the same wall from the other side. That reporter is on an RTX 5060 8 GB / 16 GB RAM, Series S + DLSS performance, and gets0x8007000Eat world entry in 4 of 4 runs on568c5e5, having tried room 80/90, DROP_MIPS 1/2 and a 2,560 MB texture budget — none of it stops it, because as he puts it "the non-texture side fills the rest of an 8 GB card". He also reports8fc2254runs a long session at 9.1-9.6 fps on the same PC. If both of you are right, the regression between8fc2254and568c5e5may matter more than either 8 GB PR — and it would explain why our own numbers across those two bases moved as much as they did.Logs: I can attach the three files here (2.0, 2.0 and 2.1 MB) or put them in a gist — say which you prefer and I will do that rather than attach them unasked.
Log analysis done with an assistant; the runs and the numbers are mine.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T11:09:46Z.
Thanks — a gist is best for logs that size.
On the read-backs: they look routine here. The same pair (
5x1 f2then1x1 f2, 80 and 16 bytes) shows up in every one of my healthy runs on this card, about one pair a second from world entry (16–18 in an eight-minute run), so I read them as the title's regular small read-back rather than a trigger; in your log they are simply the last work submitted before the removal. What would say more is what the GPU was doing in that 9 s frame: theon the GPU/waits for GPUfigures on the lines just before it, and thevideo memory as the system counts itlines, would show whether the card was paging into a 16 GB host.On the clock:
VICTORY_IMAGE_HOLDneeds the offsets of the world clock's two words for your build, which I found with a memory scan. In my runs I set and hold the clock only once the world is loaded. I saw start-up failures when holding from launch, but those turned out to be the v2026.11.29.01 start regression (#2081 and others), so I can't say holding from launch is unsafe. Any fixed hour works as long as both runs use the same one; noon was much heavier on this card than night.On #1962: agreed, the regression between
8fc2254and568c5e5may matter more than either 8 GB PR. I'm going to run the matrix kalberts0089-hash posted there on this card.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T17:04:23Z.
Fixed-clock A/B on the reporter's Windows 11 machine (AI-assisted local runs):
8efdce32; base:829188e9.victory-probe(minute img+0xab5cdd4,hour img+0xab5cdd0) and held at 12:00 during both variants.829188e98efdce32The two paired deltas were -0.15 ms and +0.65 ms. The result is neutral within noise, not a frame-time win. Earlier unclocked pairs varied from 15 to 21 FPS and are intentionally not used as evidence.
Each run had the same single
textures picked by index: the card has no room for more; they waitline. More importantly for change 2, none of the PR logs contains the expectedrender targets, depth and memory shaders write: high residency priorityline, despite 32 GB RAM and no explicitVICTORY_RESIDENCY_PRIORITY=0. Is that expected on this all-Series-S opening scene, or does it mean the applicable render targets are placed resources that this path does not reach?This does not disprove the fix for a scene that is actually paging over budget; it shows no measurable benefit in this 720p scene on a 5060 Ti, where the residency hint also did not report applying.
Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T18:11:01Z.
Fixed-clock high-load A/B on the reporter's Windows 11 machine (AI-assisted local runs):
829188e9. Candidate: current head8efdce32. Candidate used --set VICTORY_RESIDENCY_PRIORITY=1.Both runs were genuinely over budget: main logged 1,194 Streamline Exceeded VRAM budget warnings; the PR logged 1,240. Both had one no-room texture line and one no-free-descriptor line; neither reached OOM or device-removed.
Correction to my first follow-up: the missing 'high residency priority' line was a logging-filter mistake, not a code result. This PowerShell environment had RUST_LOG=warn, which filters the info-level line. I rebuilt a diagnostic copy and reran the same over-budget scene with VICTORY_LOG=victory_gpu::host=info,warn. The log then contained:
render targets, depth and memory shaders write: high residency priority
So the priority path does execute at this workload. A subsequent diagnostic line correctly showed an ineligible buffer (flags=0, default heap) before an eligible resource took the priority. There is no defect to report from the missing line, and I withdraw that part of the previous comment.
The performance result remains one pair: median FPS is neutral, P90 improved while P99 regressed. I am not treating either as proof of a regression or gain. The useful conclusion is that the PR applies in a real over-budget Series X scene without changing the outcome category in this sample.
Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T18:31:25Z.
Isolated priority A/B, same candidate and scene, with run order reversed (AI-assisted local runs):
8efdce32.VICTORY_RESIDENCY_PRIORITYchanged: 0 versus 1.VICTORY_LOG=victory_gpu::host=info,warnwas fixed for all four runs so the priority line was visible.Across the two runs per side, median frame was 55.3 ms off versus 55.8 ms on, so median is neutral within this environment. P99 was lower on in both paired runs (by 18.1 ms and 7.7 ms), while P90 followed the run order rather than the switch. Each run logged about 1,207-1,225 Streamline
Exceeded VRAM budgetwarnings, one no-room texture line and one no-free-descriptor line; none reached OOM or device-removed.The
high residency priorityline appeared in both ON logs and neither OFF log, confirming the intended switch path. My reading is that this is evidence for a tail-latency benefit of the priority hint, not for bringing the 92% Series X scene inside the budget. The reversal also shows why one pair would have overstated a median gain: the sign of the median delta changed when run order changed.I can run longer/more repetitions if you want a stronger P99 claim; four runs already show the path applied and no instability in this scene.
Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T19:29:40Z.
Validation of current head
8fcd44bdon the reporter's machine (AI-assisted local runs):8fcd44bd. The same candidate was run with only VICTORY_RESIDENCY_PRIORITY changed between 0 and 1.Both runs stayed in the same outcome category: one no-room texture line, one no-free-descriptor line, no OOM, no device-removed. Median was neutral; in this pair the ON run improved P90 by 15.1 ms and P99 by 11.5 ms.
The important check for the new commit is now positive. The ON log contains exactly two priority lines:
Neither appears in the OFF log. So the new aliased-heap path is reached on this over-budget Series X scene, not merely the committed-resource path. I would call this one pair evidence for the intended tail behavior, not proof of a median gain or of staying inside the budget.
I can repeat the reversed order if you want a stronger claim; the head is otherwise stable in this scene.
Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T19:30:35Z.
Thanks, Yuanzer: the four reversed runs are what this needed, and the correction about the log line is noted.
Two updates from my side:
8fcd44bdalso gives the high priority to the heaps behind aliased render targets (alias_rt.rsmakes them withCreateHeap, so the committed-resource path never saw them). Since upstream4ffb47bbturned aliasing off by default, that only matters withVICTORY_ALIAS_TARGETS=1; otherwise the PR behaves as at8efdce32.Your reading matches mine: the hint decides what stays in VRAM when it runs out, so any effect should show in the tail, not the median. If you have time, 3+ runs per side in A B B A order would tell whether the P99 gain holds.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T20:07:26Z.
Thanks, that confirms the aliased-heap path is reached. One note:
8fcd44bdsits on55d06914, before upstream4ffb47bbturned target aliasing off by default. On current main the second line only shows withVICTORY_ALIAS_TARGETS=1.Across your three pairs the P99 is lower with the priority on every time (86.3 → 68.2, 70.5 → 62.8 and 87.0 → 75.5 ms) while the median stays flat, which is what the hint is for.
If you rerun, the most useful comparison now is against #1733, merged upstream today.
VICTORY_RESIDENCY_HIGH=1gives card buffers, targets, depth and UAV textures the maximum priority, which covers what this PR prioritises and more. The PR head now includes current main, so three variants on it:VICTORY_RESIDENCY_PRIORITY=1(this PR);VICTORY_RESIDENCY_PRIORITY=0 VICTORY_RESIDENCY_HIGH=1(#1733 alone);If #1733 alone does as well, I'll reduce this PR to turning it on by default on machines with 24 GB of RAM or more, instead of keeping a second switch. I'm running the same three on the RTX 4060 Ti 8 GB now, unattended with victory-probe-mod's
run-bench.ps1(#2825), and will post the table.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T21:49:36Z.
This PR's priority against #1733 on the RTX 4060 Ti 8 GB / Ryzen 9 5900X / 64 GB, PR head with current main: Series X, 1484x835 → 2560x1440, DLSS Balanced. Three variants, two runs each, rotated, with the full example plan: clock held, five 60 s stretches at four places, the first 10 s of each left out. The runs were made automatically and unattended with victory-probe-mod's
run-bench.ps1(#2825, not merged yet). Two runs made while a screen share was running were discarded and repeated.VICTORY_RESIDENCY_PRIORITY=1(this PR, the default with 24 GB of RAM or more)VICTORY_RESIDENCY_PRIORITY=0 VICTORY_RESIDENCY_HIGH=1(#1733 alone)VICTORY_RESIDENCY_HIGH=1with this PR's defaultDraws stayed within 3 % between variants (7,251 / 7,398 / 7,184 median), so the views matched.
On this card #1733 alone is worse than this PR's priority: 1.7 fps less, 12.6 ms more GPU time a frame and a p95 10 ms higher. Only the first stretch, right after loading, is even. Both together land close to this PR alone, a little behind. My guess, not measured:
VICTORY_RESIDENCY_HIGHalso puts card buffers at the maximum priority, and on an 8 GB card past its budget that leaves less room for what the frame reads. So this PR keeps its own switch, and on 8 GB cardsVICTORY_RESIDENCY_HIGHis better left off with it.@Yuanzer, since you have already run #2825:
run-bench.ps1is in it now, and the same comparison is one command, with nobody at the PC:It starts the game for each variant, presses Continue until the world is loaded, runs the plan, closes the game cleanly, and writes
summary.mdwith the variants side by side. Your 32 GB machine would show whether the result holds with less RAM.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-30T07:38:07Z.
The residency priority is now a pull request of its own, #3804, and off by default there (
VICTORY_RESIDENCY_PRIORITY=1turns it on); this one keeps the first-upload guard and its doc. @Roybill203 @Yuanzer, for an A/B of the priority, #3804's branch withVICTORY_RESIDENCY_PRIORITY=1against without it is the pair now.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by davemathews12 on 2026-11-30T18:19:05Z.
I read the guard against
first_upload_decisionandroom()on its base (c71899d). The rule looks right to me:usedhere is the DXGI current usage (memory[1]), the same value the existingWholeCardcheck weighs, so the new check is consistent with it.past_budget_refusedmatches both cases in the comment: an unknown size (reserve <= 1) past the budget, and the card being over by more than the free ranges hold. It goes after theFilledCeilingreturn, so the ceiling still wins first.Two small things:
first_upload_guardis#[cfg(any(windows, test))], butcrate::asked_for!is defined only#[cfg(windows)](switch.rs). So a non-Windows test build fails on it, while today's Windows CI passes. The other switch readers handle this by keeping the macro callcfg(windows)with a stand-in elsewhere:first_upload_decisionreturnsAllowfirst whenroom(memory)is true.room()is true whenever the texture copies are undertexture_floor_bytes(min(2 GB, budget/4), about 1.7 GB on an 8 GB card), however far DXGI usage is past the budget. So with render targets alone over the budget and fewer than about 1.7 GB of texture copies, the guard doesn't run. The floor caps how much that can add, so it's bounded. Worth a line indocs/8gb-cards.mdif that's the intent.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-30T19:19:59Z.
Thanks for reading it this closely; both points are right.
first_upload_guardis nowcfg(windows), with afalsestand-in forcfg(all(test, not(windows))), as the other switch readers do.docs/8gb-cards.mdsays so now.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Damix49 on 2026-12-01T09:39:05Z.
Hello @RomanFama592. Tried this on another 5900X with an 8 GB card: Ryzen 9 5900X + RTX 3070 Ti (8 GB, DXGI budget 6.7 GB) + 32 GB DDR4-3600, Windows 11, driver 617.42. The PR (
39e1cade) was merged ontomainat5fabb46ewith no conflicts, release build with--features ab, launched withscripts\play-nvidia.ps1,VICTORY_FIRST_UPLOAD_GUARD=1. Frame generation off, noVICTORY_VRAM_BUDGET_MB.The guard never ran.
first_upload_guard()logsVICTORY_FIRST_UPLOAD_GUARD=1: past the budget, no first uploads that keep the card over itthe first time it is called, and that line never appeared:So every first-upload decision returned before line 2807 of
resource.rs, either atroom_okor at one of the earlier refusals (explicit limit, allowance off,FilledCeiling). With ~17-21k textures waiting, my guess isFilledCeiling: the texture copies are already at the face ceiling, so the guard is never asked. I haven't countedFIRST_UPLOAD_REASONSto confirm, though. On this base the card still went past its budget: the grey/white ground, skin and bushes look like the refused slots, plus the memory growth discussed in #2415 / #4079 (process ~29-35 GB, RAM 0.1-0.5 GB free on 32 GB).So with current
mainon this PC, guard on and off would give the same run. If the order of those checks changed after your 4060 Ti runs, the guard may need to come before the ceiling to bite. Happy to re-run with a build that logs the reasons, if useful.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.