MCPcopy Create free account
hub / github.com/clementgallet/libTAS / acquireImage

Function acquireImage

src/library/screencapture/ScreenCapture_Vulkan.cpp:444–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444static 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
459static void beginCommand(VkCommandBuffer cmdBuffer)
460{

Callers 2

copySurfaceToScreenMethod · 0.85
clearScreenMethod · 0.85

Calls 1

vkAcquireNextImageKHRFunction · 0.85

Tested by

no test coverage detected