GPU: retry a mesh pipeline refused with E_OUTOFMEMORY after making room #2888

Open
SlyWater wants to merge 1 commit from upstream-pr/2888 into main
SlyWater commented 2026-11-29 18:34:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by SlyWater on 2026-11-29T18:34:08Z.


What happens

host_pipeline treats a mesh pipeline the driver refuses as final: refused::failed("mesh", ...) records it once and returns None. When the refusal is E_OUTOFMEMORY — seen on 8 GB cards while an upload burst holds the device budget — every draw that needs that pipeline is dropped for the rest of the run. #2464 reports exactly this ("56 host pipelines failed (51 mesh), never retried"), and it shows as missing objects after a load; #2693 has the same card pressure.

Change

Only for E_OUTOFMEMORY: free idle texture memory (resource::let_go_idle) and spare upload chunks (host::trim_spare_chunks), wait 200 ms and ask the driver again, at most four times. Any other refusal is unchanged, and one that persists ends as before (None, logged once).

The retry is bounded (under a second on a pipeline worker) and logs once if it succeeds.

Tested

Built and run on Windows 11, i5-12400F, RTX 3070 8 GB, title 1.0.2.1, Series S 1080p:

  • the path for refusals other than E_OUTOFMEMORY is unchanged;
  • on this card the same mesh programs were refused on every attempt (the driver answered 0x8007000E on each), so the retry did not turn them into pipelines here. The value is for the transient case during upload bursts, which this machine did not reproduce.

No game files, dumps or title logs are included.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5553801431 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2888). Originally posted by [SlyWater](https://github.com/SlyWater) on 2026-11-29T18:34:08Z. --- ## What happens `host_pipeline` treats a mesh pipeline the driver refuses as final: `refused::failed("mesh", ...)` records it once and returns `None`. When the refusal is `E_OUTOFMEMORY` — seen on 8 GB cards while an upload burst holds the device budget — every draw that needs that pipeline is dropped for the rest of the run. #2464 reports exactly this ("56 host pipelines failed (51 mesh), never retried"), and it shows as missing objects after a load; #2693 has the same card pressure. ## Change Only for `E_OUTOFMEMORY`: free idle texture memory (`resource::let_go_idle`) and spare upload chunks (`host::trim_spare_chunks`), wait 200 ms and ask the driver again, at most four times. Any other refusal is unchanged, and one that persists ends as before (`None`, logged once). The retry is bounded (under a second on a pipeline worker) and logs once if it succeeds. ## Tested Built and run on Windows 11, i5-12400F, RTX 3070 8 GB, title 1.0.2.1, Series S 1080p: - the path for refusals other than `E_OUTOFMEMORY` is unchanged; - on this card the same mesh programs were refused on every attempt (the driver answered `0x8007000E` on each), so the retry did not turn them into pipelines here. The value is for the transient case during upload bursts, which this machine did not reproduce. No game files, dumps or title logs are included.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2888:upstream-pr/2888'
git switch 'upstream-pr/2888'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/2888'
git switch 'upstream-pr/2888'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2888'
git switch 'upstream-pr/2888'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2888'
git switch 'main'
git merge --squash 'upstream-pr/2888'
git switch 'main'
git merge --ff-only 'upstream-pr/2888'
git switch 'main'
git merge 'upstream-pr/2888'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!2888
No description provided.