GPU: propagate device loss from copy queue fences #964

Open
github-bot wants to merge 2 commits from github-bot/gh-964 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 13:53 UTC · original
avt0m4t48:fix/copy-queue-removed-fence → main · +77 −13 · 1 files · 2 commits · open

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.

**@⁠avt0m4t48** on GitHub · 2026-11-25 13:53 UTC · [original](https://github.com/fxceless/victory-fork/pull/964) `avt0m4t48:fix/copy-queue-removed-fence` → `main` · +77 −13 · 1 files · 2 commits · open 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:54:46 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/964/head:github-bot/gh-964'
git switch 'github-bot/gh-964'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-964'
git switch 'github-bot/gh-964'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-964'
git switch 'github-bot/gh-964'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-964'
git switch 'main'
git merge --squash 'github-bot/gh-964'
git switch 'main'
git merge --ff-only 'github-bot/gh-964'
git switch 'main'
git merge 'github-bot/gh-964'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.