C Specification
To acquire an available presentable image to use, and retrieve the index of that image, call:
// Provided by VK_VERSION_1_1 with VK_KHR_swapchain
VkResult vkAcquireNextImage2KHR(
VkDevice device,
const VkAcquireNextImageInfoKHR* pAcquireInfo,
uint32_t* pImageIndex);
Parameters
-
device
is the device associated withswapchain
. -
pAcquireInfo
is a pointer to a VkAcquireNextImageInfoKHR structure containing parameters of the acquire. -
pImageIndex
is a pointer to auint32_t
that is set to the index of the next image to use.
Description
If
VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations
is VK_TRUE
, vkAcquireNextImage2KHR
must not return
VK_ERROR_OUT_OF_HOST_MEMORY
.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.