| 442 | } |
| 443 | |
| 444 | static void acquireImage() |
| 445 | { |
| 446 | /* Acquire an image from the swapchain */ |
| 447 | VkResult res = orig::vkAcquireNextImageKHR(vk::context.device, vk::context.swapchain, UINT64_MAX, vk::context.frameSemaphores[vk::context.semaphoreIndex].imageAcquiredSemaphore, VK_NULL_HANDLE, &vk::context.frameIndex); |
| 448 | if (res == VK_ERROR_OUT_OF_DATE_KHR || res == VK_SUBOPTIMAL_KHR) { |
| 449 | LOG(LL_WARN, LCF_VULKAN, "vkAcquireNextImageKHR failed with error %d", res); |
| 450 | vk::context.swapchainRebuild = true; |
| 451 | return; |
| 452 | } |
| 453 | |
| 454 | // LOG(LL_DEBUG, LCF_VULKAN, "vkAcquireNextImageKHR signals %llx and returns image index %d", vk::context.frameSemaphores[vk::context.semaphoreIndex].imageAcquiredSemaphore, vk::context.frameIndex); |
| 455 | |
| 456 | vk::context.currentSemaphore = vk::context.frameSemaphores[vk::context.semaphoreIndex].imageAcquiredSemaphore; |
| 457 | } |
| 458 | |
| 459 | static void beginCommand(VkCommandBuffer cmdBuffer) |
| 460 | { |
no test coverage detected