MCPcopy Create free account
hub / github.com/comaps/comaps / Present

Method Present

libs/drape/vulkan/vulkan_base_context.cpp:517–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517void VulkanBaseContext::Present()
518{
519 if (m_needPresent)
520 {
521 VkPresentInfoKHR presentInfo = {};
522 presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
523 presentInfo.pNext = nullptr;
524 presentInfo.swapchainCount = 1;
525 presentInfo.pSwapchains = &m_swapchain;
526 presentInfo.pImageIndices = &m_imageIndex;
527 presentInfo.pWaitSemaphores = &m_renderSemaphores[m_inflightFrameIndex];
528 presentInfo.waitSemaphoreCount = 1;
529
530 auto const res = vkQueuePresentKHR(m_queue, &presentInfo);
531 if (res != VK_SUCCESS && res != VK_SUBOPTIMAL_KHR && res != VK_ERROR_OUT_OF_DATE_KHR && res != VK_ERROR_DEVICE_LOST)
532 CHECK_RESULT_VK_CALL(vkQueuePresentKHR, res);
533 }
534
535 m_inflightFrameIndex = (m_inflightFrameIndex + 1) % kMaxInflightFrames;
536
537 m_pipelineKey = {};
538 m_stencilReferenceValue = 1;
539 ClearParamDescriptors();
540}
541
542void VulkanBaseContext::CollectMemory()
543{

Callers 2

RenderEmptyFrameMethod · 0.45
RenderFrameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected