| 515 | } |
| 516 | |
| 517 | void 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 | |
| 542 | void VulkanBaseContext::CollectMemory() |
| 543 | { |
no outgoing calls
no test coverage detected