gpu: recover startup command lists after failed Close #1763

Merged
R0Y00 merged 1 commit from upstream-pr/1770 into main 2026-11-24 18:40:40 +00:00
R0Y00 commented 2026-11-24 18:17:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T18:17:40Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588480492 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1770). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T18:17:40Z. --- 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.
upstream-sync closed this pull request 2026-11-24 19:01:25 +00:00
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
R0Y00/Xbox2Windows!1763
No description provided.