diff options
| author | woreksami <249861314+woreksami@users.noreply.github.com> | 2026-11-22 13:09:56 -0500 |
|---|---|---|
| committer | woreksami <249861314+woreksami@users.noreply.github.com> | 2026-11-22 13:09:56 -0500 |
| commit | 7762899b333ce641a354901da5baafe0a9441114 (patch) | |
| tree | b01b83180658fc64cd55932029fff546caba46e3 /runtime/src/main.cpp | |
| parent | 49475796c226c8511b9470bf97a4daf57b8af323 (diff) | |
Runtime: hold a CPU fence signal until the queue signals before it have completed
ID3D12Fence::Signal from the CPU called vkSignalSemaphore at once, also while a queue Signal of a lower value
was still pending on the GPU. Vulkan requires a host signal to stay below every pending signal
(VUID-VkSemaphoreSignalInfo-value-03259), and D3D12 allows the order. The fence now records the highest value a
queue will signal, under the same lock as the claim, and a CPU signal above a value the GPU has not reached yet
(or made while an earlier one is held) is handed to the fence dispatcher, which applies it once the GPU passes
that value, in the order the signals were made. The callback holds no pointer to the fence; when the fence is
released (cancel) or the device is lost before the queue value is reached, the held signal is dropped, since
signalling then would break the same rule. Until a held signal is applied, GetCompletedValue reads the GPU's
progress.
d3d12_fence_timing_test: a queue Signal kept pending by a Wait on a gate fence, a CPU Signal above it (held, then
applied), and two CPU signals held behind one queue signal (applied in order). Fails on main's Fence at the first
check: the event for the CPU value fired while the queue signal was still pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions