GPU: a small allocation failure no longer ends the title #1624
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1624
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1624"
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?
@mizzied on GitHub · 2026-11-28 22:34 UTC · original
mizzied:up/fetch-stepdown→main· +235 −16 · 3 files · 1 commits · merged 2026-11-29 08:16 UTCWhat was wrong. A failed 16 MiB allocation for a fetch buffer ended the title, even when the PC was only briefly short of memory.
The fix.
NO MEMORY TO FETCHis logged, and the title goes on.VICTORY_FETCH_STEPDOWN=0restores the old behaviour.Related open PRs #1472 (retry texture staging smaller) and #625 cover nearby allocations, but not the fetch buffers.
How it was tested. RTX 5070, Windows 11. There are five tests in
fetchmem.rscovering the step-down sizes, the single retry, the skip and the switch.cargo test --workspacepasses apart fromrepository_passes_policy, which already fails onmain:lower.rsis over the 640 KiB file-size limit there (#1493 raises it). Clippy reports only the 16 findings already onmain, none on lines this PR changes. Thevictory-gpuwatch::tests are flaky on this machine in files this PR does not touch, and pass on a rerun.The relay's fetch buffer and the card-back fetch buffer were made 16 MiB at a time, and where the system refused that the layer ended the run through host::fail ("no memory to fetch what shaders wrote to the card's memory"), though the PC had room for the few megabytes a fetch needs. Both now step down (16 MiB rounded, 1 MiB, the least the bytes allow; not the first while host memory pressure is on), try the least once more after a moment, and if none can be made the fetch is skipped, counted and logged loudly (NO MEMORY TO FETCH): the pieces stay as they were in title memory until a later fetch of them. A read-back buffer is retried once the same way. VICTORY_FETCH_STEPDOWN=0 restores the single 16 MiB try and the fatal failure. Tests (fetchmem.rs): the step-down sizes, the pressure case, the retry of the least, and the count of skipped fetches.@babuakhil on GitHub · 2026-11-28 23:14 UTC · original
Second machine for this: Windows 11, RTX 3060, Ryzen 7 5700X, Rust 1.98.1 (pinned), applied on current
main(d4b5d51); cherry-picks cleanly.victory-gpu, with and without--all-features: the same 2 errors asmain, none infetchmem.rsor the changed parts ofhost.rsfetchmemtests pass;cargo test -p victory-gpu --lib --locked: 555 passed in 2 of 3 runs, and the third had one failure inwatch::tests::what_is_put_in_beside_the_guards_is_told_at_every_view, awatchtest that fails now and then onmaintoo; with--all-features, 609 passedReading the paths, since an allocation failure can't be forced on a real card from a test:
shared_bufferreturnsNonewith a warning when creation fails rather than ending the run, sofetchmem::buffergets each size in turn.pieces.is_empty()path (relay_fetched(after), then return), andRELAY_FETCHEDis only read bycard_dirtyto drop ordering notes, so the bookkeeping stays as it is when there is nothing to fetch.stale_bytes_so_far) make it visible; worth keeping in mind when a report showsNO MEMORY TO FETCH.Not checked: a run that actually hits the failure (the unit tests drive
fetchmem::bufferwith a fakemake), and the comment that the old buffer's last fetch has been waited for before it is let go.github-bot referenced this pull request2026-11-29 10:17:24 +00:00