d3d12: preserve same-value retry after a failed fence signal (D3D-FENCE-SIGNAL-RETRY) #1455

Open
github-bot wants to merge 1 commit from github-bot/gh-1455 into main AGit
Owner

@⁠PyZikYG on GitHub · 2026-11-25 00:32 UTC · original
PyZikYG:d3d12-fence-signal-retry → main · +135 −36 · 4 files · 1 commits · open

Claimed as D3D-FENCE-SIGNAL-RETRY.

Summary

A synchronous Vulkan failure in ID3D12Fence::Signal or ID3D12CommandQueue::Signal previously left the fence's highest accepted value advanced. Retrying the same value could return success without signalling anything, leaving a dependent queue held.

Publish the fence value after a successful CPU signal or admission to the command queue. Release retired references and run ready queue work after dropping the fence lock.

Verification

Injected transient failures in vkSignalSemaphore and vkQueueSubmit. Verified that the failed call leaves the fence value and waiting queue pending, and that retrying the same value releases the queue. Covered retries from the CPU, from the queue, and from the CPU after a queue submission fails.

AI-assisted: yes.

**@⁠PyZikYG** on GitHub · 2026-11-25 00:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1455) `PyZikYG:d3d12-fence-signal-retry` → `main` · +135 −36 · 4 files · 1 commits · open Claimed as [D3D-FENCE-SIGNAL-RETRY](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). ### Summary A synchronous Vulkan failure in `ID3D12Fence::Signal` or `ID3D12CommandQueue::Signal` previously left the fence's highest accepted value advanced. Retrying the same value could return success without signalling anything, leaving a dependent queue held. Publish the fence value after a successful CPU signal or admission to the command queue. Release retired references and run ready queue work after dropping the fence lock. ### Verification Injected transient failures in `vkSignalSemaphore` and `vkQueueSubmit`. Verified that the failed call leaves the fence value and waiting queue pending, and that retrying the same value releases the queue. Covered retries from the CPU, from the queue, and from the CPU after a queue submission fails. AI-assisted: yes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:52:00 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 06:22 UTC · original

Independent verification on both of our GPUs (native Windows 11, validation on):

  • NVIDIA RTX 4070 SUPER: 24/24 pass — d3d12_fence_device_lost_counter (incl. the new injected-failure retry cases), all d3d12_fence_*, d3d12_queue_*, queue_proxy, vk_queue, vk_fence_dispatcher_sync, vk_sync_validation, vk_command_replay, vk_queue_constructor_oom.
  • AMD Radeon iGPU (gfx1036, LEONIDA_PC_TAIL_UBO=1): 23 pass + 1 by-design skip (d3d12_queue_handover_two_queues — single-queue family returns 77).

AI-assisted verification.

**@⁠whoalin1** on GitHub · 2026-11-25 06:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1455#issuecomment-7154732126) Independent verification on both of our GPUs (native Windows 11, validation on): - **NVIDIA RTX 4070 SUPER**: 24/24 pass — `d3d12_fence_device_lost_counter` (incl. the new injected-failure retry cases), all `d3d12_fence_*`, `d3d12_queue_*`, `queue_proxy`, `vk_queue`, `vk_fence_dispatcher_sync`, `vk_sync_validation`, `vk_command_replay`, `vk_queue_constructor_oom`. - **AMD Radeon iGPU** (gfx1036, `LEONIDA_PC_TAIL_UBO=1`): 23 pass + 1 by-design skip (`d3d12_queue_handover_two_queues` — single-queue family returns 77). AI-assisted verification.
This pull request has changes conflicting with the target branch.
  • runtime/src/vulkan_backend.h
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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