Report memory exhaustion when a host command list cannot close #4806

Closed
github-bot wants to merge 1 commit from github-bot/gh-4805 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 09:32 UTC · original
andrewpozdnakov7-jpg:fix/close-oom-diagnostics → main · +14 −7 · 1 files · 1 commits · closed without merging

Refs #4723

Main at 5fabb46 has five Clippy errors covered by #4708.

What it changes

In #4723, ID3D12GraphicsCommandList::Close reports 0x8007000E. The release and current main both describe every failed Close as an invalid recorded command. D3D12 documents separate return codes for an invalid argument and memory exhaustion.

Report memory exhaustion for E_OUTOFMEMORY and attach the same RAM, commit and adapter figures used for a failed command reset when available. Keep the existing description for E_INVALIDARG and report the HRESULT alone for other errors. This addresses the crash message. The allocation pressure in #4723 remains open.

How it was tested

  • Windows x64 / MSVC. Injected the three HRESULTs into the exact formatting path from main 5fabb46 and 15cd2f0. The OOM case changes from an invalid-command message to memory exhaustion with the injected memory figures. The invalid-argument message matches main, and E_FAIL retains its HRESULT.
  • cargo check --locked -p victory-gpu --jobs 2 passed.
  • cargo xtask policy --staged passed for the one changed file.
  • The formatting harness uses mock resources. No game run or induced GPU memory exhaustion.

Checked for overlap

  • Reviewed open and closed reports for the Close error and open PRs touching host.rs. #4574 changes debug-layer message selection. #3488 and #3975 work on recovering from a Close failure. This change classifies the HRESULT and captures memory figures in main's existing failure path.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 09:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4805) `andrewpozdnakov7-jpg:fix/close-oom-diagnostics` → `main` · +14 −7 · 1 files · 1 commits · closed without merging Refs #4723 Main at `5fabb46` has five Clippy errors covered by #4708. ## What it changes In #4723, `ID3D12GraphicsCommandList::Close` reports `0x8007000E`. The release and current main both describe every failed Close as an invalid recorded command. [D3D12 documents separate return codes for an invalid argument and memory exhaustion](https://learn.microsoft.com/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-close). Report memory exhaustion for `E_OUTOFMEMORY` and attach the same RAM, commit and adapter figures used for a failed command reset when available. Keep the existing description for `E_INVALIDARG` and report the HRESULT alone for other errors. This addresses the crash message. The allocation pressure in #4723 remains open. ## How it was tested - Windows x64 / MSVC. Injected the three HRESULTs into the exact formatting path from main `5fabb46` and `15cd2f0`. The OOM case changes from an invalid-command message to memory exhaustion with the injected memory figures. The invalid-argument message matches main, and `E_FAIL` retains its HRESULT. - `cargo check --locked -p victory-gpu --jobs 2` passed. - `cargo xtask policy --staged` passed for the one changed file. - The formatting harness uses mock resources. No game run or induced GPU memory exhaustion. ## Checked for overlap - [x] Reviewed open and closed reports for the Close error and open PRs touching `host.rs`. #4574 changes debug-layer message selection. #3488 and #3975 work on recovering from a Close failure. This change classifies the HRESULT and captures memory figures in main's existing failure path. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 09:32:20 +00:00
github-bot changed title from [pr-fix][crash][memory] Report memory exhaustion when a host command list cannot close to Report memory exhaustion when a host command list cannot close 2026-12-01 09:39:54 +00:00
github-bot closed this pull request 2026-12-01 18:36:30 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:31 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4805#issuecomment-7321091798) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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