GPU: a small allocation failure no longer ends the title #1624
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mizzied on 2026-11-28T22:34:14Z.
What 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.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by babuakhil on 2026-11-28T23:14:00Z.
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.