victory-gpu: first_upload_decision bypasses WholeCard VRAM guard when free_blocks >= reserve, letting VRAM exceed budget and kill DLSS/FG #1496
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Bj0rnis on 2026-11-28T20:48:47Z.
Summary
On
main(923e38c, introduced in25b3b5c),first_upload_decision()incrates/victory-gpu/src/resource.rs:2101-2104bypasses theFirstUpload::WholeCardVRAM guard wheneverreserve <= free_blocks— even when total GPU memoryusedis already well pastbudget.On a 16 GB RTX 5070 Ti (
14,767 MBbudget) running Series X2560×1440with DLSS Quality + 2× Frame Generation (RT off, defaultVICTORY_TEXTURE_ROOM_PERCENT=80), VRAM climbed from13.8 GBto17,043 MB(+2.3 GB over budget) whilefirst-upload room decisionslogged71,820 allowed, 0 refused at the texture-copy ceiling, 0 at the whole-card budget. Streamline DLSS began failing withslEvaluateFeature: warning: out of VRAM (39)~3 minutes in (disabling FG), ending in a0xc0000005fault innvwgf2umx.dllat ~16.5 minutes.Environment
main923e38c(--release,Rust 1.98.1)621.24, Streamline2.14.16/ NGX310.9.16), Ryzen 7 9800X3D, 32 GB RAM, Windows 11play-foxhound.ps1defaults (Series X,2560×1440,-Dlss quality,-FrameGen -FrameGenX 2,VICTORY_FULLSCREEN=1, RT off;VICTORY_TEXTURE_ROOM_PERCENT=80, defaultVICTORY_TEXTURE_FIRST_UPLOAD_MB=128)Root cause in
crates/victory-gpu/src/resource.rs:2101-2104free_blocks(crate::pool::texture_room()) is the aggregate free space across all texture pool heaps (e.g.,16–91 MBof fragmented ranges across multiple heaps), whereas an individual texture'sreserveis small (typically4–256 KB).reserve <= free_blocks,new_card_bytesevaluates to0, soif new_card_bytes > 0isfalseandFirstUpload::WholeCardnever triggers — even whenused >= budget.filled(texture copies alone:9,708 MB) stays below the 80%ceiling(11,813 MB) while total cardused(render targets + Streamline DLSS/FG + card buffers + pool overhead) is already over100%ofbudget,FirstUpload::FilledCeilingdoes not trigger either.pool::texture, pushing VRAM further pastbudget.Observed
victory-gpuVRAM telemetry (from the 16.5-min run)13,806 MB in use - 820 MB free in texture blocks ...(budget14,728 MB)WARN victory_gpu::streamline: DLSS: the upscaling was not recorded: slEvaluateFeature: warning: out of VRAM (39)(~19,800 warnings over the rest of the run; FG drops off)15,759 MB in use - 217 MB free in texture blocksnvwgf2umx.dllfault):the texture queue's room: 17043 MB in use - 16 MB free in texture blocks + 0 MB kept for card copies of title buffers + 604 MB kept for render targets = 17631 MB against a line of 11813 MB (80.0 % of a budget of 14767 MB; 11557 MB after face headroom, 9708 MB in texture copies): no room, new textures waitfirst host textures admitted just over the room line in the last 5 seconds: 643; first-upload room decisions: 71820 allowed, 0 refused by an explicit byte limit, 0 without memory info, 0 with the allowance off, 0 at the texture-copy ceiling, 0 at the whole-card budgetSuggested fix direction
FirstUpload::WholeCardwheneverused >= budget(orused.saturating_add(reserve) >= budgetunless placement is guaranteed to stay inside an existing heap without creating a new block — e.g., whenpool::texturecannot fall back to allocating a new heap whileused >= budget).used >= budget, stop admitting over-room first uploads regardless of aggregatefree_blocks(or gatepool::textureagainst allocating a new heap on the over-room first-upload path).Temporary workaround
Setting
VICTORY_TEXTURE_FIRST_UPLOAD_MB=0disables the over-room admission path (FirstUpload::AllowanceOff) and keeps VRAM under budget.AI-assisted analysis and report.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by GreekNinja on 2026-11-28T21:10:38Z.
Confirmed independently on RTX 3060 12 GB + Ryzen 7 5700X + 16 GB RAM (Windows 11, Series S,
923e38c).Observed progression
20:32:27:11349 MB in use - 171 MB free in texture blocksvs11345 MBbudget (6613 MBin texture copies) ->3500 allowed, 0 refused at the whole-card budget20:32:48–20:34:00:usedclimbed to12,082 MB / 11,345 MB(+737 MB over DXGI budget), still logging0 refused at the whole-card budget, cascading into228,9560x8007000Eallocation failures and ending in an0xc0000005NULL-deref innvwgf2umx.dll+0x3c0201.VICTORY_TEXTURE_FIRST_UPLOAD_MB=0immediately stopped the overshoot (VRAM stayed at8,947–9,210 / 11,330 MB,0OOM errors).Additional related defects found in the same path
crates/victory-gpu/src/resource.rs:2101-2104(first_upload_decision):if new_card_bytes > 0 && used.saturating_add(new_card_bytes) >= budgetskips the guard wheneverreserve <= free_blocks(even whenused >= budget). Alsopool::texture_room()decrementsHELDimmediately while pieces sit inREST = 2500 msquarantine, sofree_blocksoverstates immediately allocatable space and still triggers new 64 MiBCreateHeapcalls.new_card_bytes > 0 &&soif used.saturating_add(new_card_bytes) >= budget { return FirstUpload::WholeCard; }.crates/victory-gpu/src/resource.rs:2145(first_upload_headroom_from):budget.saturating_sub(used).saturating_add(free_blocks)still grantsfree_blocks - reserveper 5 s window whenused >= budget.0wheneverused >= budget(let Some(budget_left) = budget.checked_sub(used).filter(|&l| l > 0) else { return 0; };).crates/victory-gpu/src/draw.rs:3378, 4001-4004:memoryis never updated whenroomis re-checked mid-pass, soroom_for_first_upload(memory, reserve)uses a stale VRAM snapshot for the whole pass.crates/victory-gpu/src/draw.rs:1023-1027(first_upload_spend): on window rollover,*window = (now, bytes.min(cap)); return bytes <= cap;setswindow.1 = capeven whenbytes > cap(refused), starving smaller uploads for the rest of that 5 s window.Note: This report/comment was generated and submitted automatically by an AI assistant analyzing real local play logs and source code on behalf of the user.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-28T22:14:21Z.
Independent reproduction of #1496 on an RTX 5070 12 GB, current
main923e38cc8c92cd1c42090076382138538f2bb487.Environment
DBD5D11DC330002C29C0E3AF8D357500A1CCFF2529180AA5A2EF3FD29DBDD7D9VICTORY_DLSS=1VICTORY_DLSS_MODE=performanceVICTORY_FRAMEGEN=1VICTORY_FRAMEGEN_X=3VICTORY_TEXTURE_ROOM_PERCENT=80VICTORY_TEXTURE_POOL=1VICTORY_LEVELS_ON_DEMAND=0VICTORY_BVH_MISS=1)Result
Correction on onset: the log file name predates its first timestamped runtime event by about 26 minutes, so the file name cannot be used as the beginning of the active DLSS/FG interval. The first recorded out-of-VRAM failure is 5 minutes 26 seconds after the first timestamped Streamline event. Streamline's own elapsed counter at that failure reads 328.2 seconds, which agrees with that interval. This report therefore does not claim that VRAM stayed within budget before timestamped Streamline logging began.
The first recorded failure was:
At the time of sampling, the failure had persisted for at least another 23 minutes. During that sampled interval the log contained:
slEvaluateFeature: warning: out of VRAM (39)entriesExceeded VRAM budgetentriesThe warning continued on essentially every evaluation attempt. DLSS Frame Generation 3x remained enabled in the settings but stopped producing visible/generated frames after the VRAM refusals began.
Six
nvidia-smisamples at two-second intervals during the failure:The
nvidia-smifigures are whole-adapter measurements rather than per-process attribution. The Streamline budget warning and DLSS evaluation refusal are emitted directly in this VIctory process, independently confirming that the active run is over its usable DXGI/Streamline budget even though a few hundred MB of physical VRAM remain.This was a release build, so the detailed diagnostic texture-pool breakdown was not present. No proprietary files, shader identifiers, local paths, or wall-clock times are included here.
This reproduces the failure mode described in #1496 on a second 12 GB NVIDIA configuration. I can repeat the same route and sampling procedure against #1544 to check whether the whole-card admission guard prevents the overshoot, keeps DLSS evaluation alive, and restores frame generation.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-28T23:54:18Z.
Follow-up on my RTX 5070 reproduction: I ran a controlled A/B test of #1544 against
main923e38c, with the same profile as above (Series X, 1440p, DLSS Performance, DLSS-G 3×, 30 FPS cap,VICTORY_TEXTURE_ROOM_PERCENT=80), idle, with both runs cut to a 1,060 s window. Full table: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1544#issuecomment-7247738174In short:
main.main. The texture queue's weighed use ends about 4 GB above its room line in both runs.out of VRAM (39)(10,371 with #1544, 11,717 onmain). No device removed and no0x8007000Estorm on this card.So #1544 closes one admission path but does not resolve this issue on a 12 GB card with DLSS-G. The remaining growth matches the follow-ups the PR lists as out of scope. One run per build, and the idle workload diverged between the runs; the PR comment covers the limits.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wzl271 on 2026-11-29T02:01:14Z.
16 GB card:
a38716dremoves the admission thrash, but residency still exceeds physical VRAMI put
a38716don top of the release tag (nothing else —v2026.11.28.03+ that one commit,resource.rsconflicts were the pure-additive hunks) and ran the same build/place for 13 minutes at 2560x1440, Series X profile,VICTORY_HOST_RDNA=2 RDNA_FLOAT=1 HELPER_OWN=1 FIRSTLANE_OWN=1 WAVE_WIDE=1 FULLSCREEN=1, texture room at the default 95 %.What the fix did (this is the part that works): across 139 five-second samples the GPU time never exceeded 43.4 ms (mean 5.2 ms) and the queue kept draining —
copies 17–35 ms / 43–72 MBper frame, 5048 draws. On the unpatched release build the same scene falls off the same cliff at ~10 min with204.6 ms ... on the GPUand then 600–1600 ms. So the "over budget, admit only into a free range that exists now" behaviour is doing what it says.What it cannot do: the run still collapses, 13 min in, because the residency is over the card, not over the line:
Peak
in use15407 MB. Windows' own counters at that moment (three samples,GPU Engine/GPU Adapter Memory):i.e. ~15.9 GB pinned in VRAM plus ~9.3 GB spilled into system memory, so every frame is a page-fault storm and
on the GPUis the wait, exactly as in #1496's diagnosis — just against physical memory this time instead of against the 94.8 % line. On the 7900 XTX in your report 15.4 GB fits and the fix gets you 86–90 % of base framerate; on a 16 GB card it can't.Two questions
VICTORY_VRAM_BUDGET_MBandVICTORY_TEXTURE_BUDGET_MBexist in the binary but the loggedbudgetstays at the hardware figure (14704–15556 MB across runs) whatever I set them to. Are they meant to cap the residency, or only to feedroom_line()?VICTORY_TEXTURE_AWAY_MS/VICTORY_SLOT_EVICT_PERCENTshape) on the table? On 16 GB that is the only thing that turns "13 good minutes" into a session — the working set never stops growing, so a bigger line or a better admission only moves the cliff.Machine: RX 7900 GRE 16 GB, Ryzen 5 5600, 48 GB, Windows 10 19045, Adrenalin 32.0.32029.2010, GTA6 930.048.020-vb_sub_story (Series X dump). Binary built from source with the GNU toolchain (
x86_64-pc-windows-gnu, rustc 1.100.1) — separate issue for the missingD3D12SDKVersionexport on that target. Log:%LOCALAPPDATA%\victory\logs\victory-nvidia-play-20261129-014408-9084.log.Next on my list is the Series S picture size (1920x1080 DLAA / 1280x720) to see whether the working set can be held under 14.5 GB at all; I will report the numbers here either way.