gpu: recover startup command lists after failed Close #1770

Manually merged
github merged 1 commit from gh-pr/1770/head into gh-pr/1770/base 2026-11-26 23:32:21 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-24 18:17 UTC · original
R0Y00:codex/recover-failed-command-list → main · +135 −35 · 5 files · 1 commits · merged 2026-11-24 18:40 UTC

Refs #1352

Change

Desktop Reset repeats a failed Close HRESULT on the same command-list object. Return the actual errors through the startup wrapper and drop the failed recording. On the next Reset, create a desktop list of the same type and node on the requested allocator while preserving the existing wrapper handle. Failed creation leaves recovery available for another Reset.

Serialize queue selection and allocator fence bookkeeping against Reset. Release the replaced command-list reference after dropping its recording-only state. Pending submits retain their allocator and descriptor lifetimes through the existing paths.

The source-built fixture queues a valid compute recording behind a fence, then poisons the next recording with a viewport call. It checks that Close fails, a direct allocator is refused, and retry with a compute allocator succeeds. It attempts to submit the poisoned recording, completes the prior valid and recovered work, and checks for unexpected debug errors and device removal.

Verification

Base 312f5613, head 6604fab7. Windows 11 build 26200.9974, MSVC 19.51.36244, Microsoft Basic Render Driver (WARP) and NVIDIA GeForce RTX 4060 Laptop GPU (616.56). D3D12 debug layer enabled.

cmake --build --preset dev --target startup_list_resubmit
ctest --preset dev --no-tests=error -R '^startup_list_resubmit_' --output-on-failure
cmake --build --preset release --target startup_list_resubmit
ctest --preset release --no-tests=error -R '^startup_list_resubmit_' -V
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
git diff HEAD^ HEAD --check

Both presets passed all four cases, including both forced submit-fence failure cases. Zero skips. Close returned 0x80004005, wrong-type Reset returned 0x80070057, recovered Reset/Close returned S_OK, and no unexpected debug errors remained.

The same fixture built against the unmodified runtime at 312f5613 failed the Release WARP case at step 7, with both failed operations reported by the wrapper as S_OK.

AI-assisted.

**@⁠R0Y00** on GitHub · 2026-11-24 18:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1770) `R0Y00:codex/recover-failed-command-list` → `main` · +135 −35 · 5 files · 1 commits · merged 2026-11-24 18:40 UTC Refs #1352 ## Change Desktop Reset repeats a failed Close HRESULT on the same command-list object. Return the actual errors through the startup wrapper and drop the failed recording. On the next Reset, create a desktop list of the same type and node on the requested allocator while preserving the existing wrapper handle. Failed creation leaves recovery available for another Reset. Serialize queue selection and allocator fence bookkeeping against Reset. Release the replaced command-list reference after dropping its recording-only state. Pending submits retain their allocator and descriptor lifetimes through the existing paths. The source-built fixture queues a valid compute recording behind a fence, then poisons the next recording with a viewport call. It checks that Close fails, a direct allocator is refused, and retry with a compute allocator succeeds. It attempts to submit the poisoned recording, completes the prior valid and recovered work, and checks for unexpected debug errors and device removal. ## Verification Base `312f5613`, head `6604fab7`. Windows 11 build 26200.9974, MSVC 19.51.36244, Microsoft Basic Render Driver (WARP) and NVIDIA GeForce RTX 4060 Laptop GPU (616.56). D3D12 debug layer enabled. ```powershell cmake --build --preset dev --target startup_list_resubmit ctest --preset dev --no-tests=error -R '^startup_list_resubmit_' --output-on-failure cmake --build --preset release --target startup_list_resubmit ctest --preset release --no-tests=error -R '^startup_list_resubmit_' -V python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py git diff HEAD^ HEAD --check ``` Both presets passed all four cases, including both forced submit-fence failure cases. Zero skips. Close returned `0x80004005`, wrong-type Reset returned `0x80070057`, recovered Reset/Close returned `S_OK`, and no unexpected debug errors remained. The same fixture built against the unmodified runtime at `312f5613` failed the Release WARP case at step 7, with both failed operations reported by the wrapper as `S_OK`. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:32:19 +00:00
github manually merged commit 6604fab78e into gh-pr/1770/base 2026-11-26 23:32:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.