| 836 | } |
| 837 | |
| 838 | VkResult Queue::Present(const Swapchain& swapchain, uint32_t image_index, const Semaphore& wait_semaphore, |
| 839 | void* present_info_pnext) { |
| 840 | VkPresentInfoKHR present = vku::InitStructHelper(present_info_pnext); |
| 841 | if (wait_semaphore.initialized()) { |
| 842 | present.waitSemaphoreCount = 1; |
| 843 | present.pWaitSemaphores = &wait_semaphore.handle(); |
| 844 | } |
| 845 | present.swapchainCount = 1; |
| 846 | present.pSwapchains = &swapchain.handle(); |
| 847 | present.pImageIndices = &image_index; |
| 848 | VkResult result = vk::QueuePresentKHR(handle(), &present); |
| 849 | return result; |
| 850 | } |
| 851 | |
| 852 | VkResult Queue::Wait() { |
| 853 | VkResult result = vk::QueueWaitIdle(handle()); |