| 2241 | } |
| 2242 | |
| 2243 | bool FenceManagerVulkan::WaitForFence(FenceVulkan* fence, float timeoutSeconds) const |
| 2244 | { |
| 2245 | if (fence->IsSignaled) |
| 2246 | return false; |
| 2247 | PROFILE_CPU(); |
| 2248 | ZoneColor(TracyWaitZoneColor); |
| 2249 | ASSERT(_usedFences.Contains(fence)); |
| 2250 | uint64 timeNanoseconds = (uint64)((double)timeoutSeconds * 1000000000.0); |
| 2251 | const VkResult result = vkWaitForFences(_device->Device, 1, &fence->Handle, true, timeNanoseconds); |
| 2252 | LOG_VULKAN_RESULT(result); |
| 2253 | if (result == VK_SUCCESS) |
| 2254 | { |
| 2255 | fence->IsSignaled = true; |
| 2256 | return false; |
| 2257 | } |
| 2258 | LOG(Warning, "vkWaitForFences failed with timeout: {}s", timeoutSeconds); |
| 2259 | return true; |
| 2260 | } |
| 2261 | |
| 2262 | void FenceManagerVulkan::ResetFence(FenceVulkan* fence) const |
| 2263 | { |