diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 23:13:05 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 23:13:05 -0500 |
| commit | dc473d8c175064eeb4c9a2ed65992a38cb0f396b (patch) | |
| tree | fd834067899a96d8f9c5566d7f3912d2c6d86f2c /runtime/shims/d3d12_com.cpp | |
| parent | 0351af3ef497babb0549bb5e2caf7288b1386efc (diff) | |
| parent | 8dfe9bce1a3cf078685db7a8da88b3b2b47e07a8 (diff) | |
Merge pull request #4282 from cixotdev
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/d3d12_com.cpp')
| -rw-r--r-- | runtime/shims/d3d12_com.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp index 953d91b14..4fe98e2a4 100644 --- a/runtime/shims/d3d12_com.cpp +++ b/runtime/shims/d3d12_com.cpp | |||
| @@ -1214,14 +1214,19 @@ public: | |||
| 1214 | const VkSemaphore semaphore = fence_.semaphore(); | 1214 | const VkSemaphore semaphore = fence_.semaphore(); |
| 1215 | context_.enqueue_fence_callback(semaphore, queued, [context, semaphore, queued, value, held = held_] { | 1215 | context_.enqueue_fence_callback(semaphore, queued, [context, semaphore, queued, value, held = held_] { |
| 1216 | std::uint64_t now = 0; | 1216 | std::uint64_t now = 0; |
| 1217 | context->vk.vkGetSemaphoreCounterValue(context->device(), semaphore, &now); | 1217 | bool signaled = false; |
| 1218 | if (now >= queued && now < value) { | 1218 | if (context->vk.vkGetSemaphoreCounterValue(context->device(), semaphore, &now) == VK_SUCCESS && |
| 1219 | now >= queued && now < value) { | ||
| 1219 | VkSemaphoreSignalInfo info{VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO}; | 1220 | VkSemaphoreSignalInfo info{VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO}; |
| 1220 | info.semaphore = semaphore; | 1221 | info.semaphore = semaphore; |
| 1221 | info.value = value; | 1222 | info.value = value; |
| 1222 | context->vk.vkSignalSemaphore(context->device(), &info); | 1223 | signaled = context->vk.vkSignalSemaphore(context->device(), &info) == VK_SUCCESS; |
| 1223 | } | 1224 | } |
| 1224 | held->fetch_sub(1); | 1225 | held->fetch_sub(1); |
| 1226 | if (signaled) { | ||
| 1227 | context->holds().signaled(semaphore, value); | ||
| 1228 | context->holds().pump_ready(); | ||
| 1229 | } | ||
| 1225 | }); | 1230 | }); |
| 1226 | return S_OK; | 1231 | return S_OK; |
| 1227 | } | 1232 | } |