GPU: propagate device loss from copy queue fences #963

Open
avt0m4t48 wants to merge 2 commits from upstream-pr/964 into main
avt0m4t48 commented 2026-11-25 13:53:26 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T13:53:26Z.


D3D12 reports UINT64_MAX from GetCompletedValue when a device is removed. The copy queue treated that as successful completion, including for a pending download whose commands had not run. A wait already blocked on the fence can also wake on removal. D3D12 fence contract

Check for removal before recycling copy lists, before waiting and after the event wakes. Return the device's recorded error when available and propagate a failed Windows event wait.

The regression queues a copy behind an unsignalled fence on an isolated WARP device, removes the device, and checks that the pending copy isn't reported as complete. The original test failed at that assertion. With the patch, the removed lane also refuses list allocation and the wait returns the device's error. All eight copy-queue tests passed on Windows, along with the local MSVC-target Rust check and asset policy. I did not test a physical adapter or reproduce a title hang. Baseline run · Patched run

AI-assisted using Codex.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6606065910 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/964). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-25T13:53:26Z. --- D3D12 reports `UINT64_MAX` from `GetCompletedValue` when a device is removed. The copy queue treated that as successful completion, including for a pending download whose commands had not run. A wait already blocked on the fence can also wake on removal. [D3D12 fence contract](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12fence-getcompletedvalue) Check for removal before recycling copy lists, before waiting and after the event wakes. Return the device's recorded error when available and propagate a failed Windows event wait. The regression queues a copy behind an unsignalled fence on an isolated WARP device, removes the device, and checks that the pending copy isn't reported as complete. The original test failed at that assertion. With the patch, the removed lane also refuses list allocation and the wait returns the device's error. All eight copy-queue tests passed on Windows, along with the local MSVC-target Rust check and asset policy. I did not test a physical adapter or reproduce a title hang. [Baseline run](https://github.com/avt0m4t48/victory-fork/actions/runs/45626360911) · [Patched run](https://github.com/avt0m4t48/victory-fork/actions/runs/45627451748) AI-assisted using Codex.
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/964:upstream-pr/964'
git switch 'upstream-pr/964'

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/964'
git switch 'upstream-pr/964'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/964'
git switch 'upstream-pr/964'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/964'
git switch 'main'
git merge --squash 'upstream-pr/964'
git switch 'main'
git merge --ff-only 'upstream-pr/964'
git switch 'main'
git merge 'upstream-pr/964'
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
fxceless/victory-fork!963
No description provided.