C Specification

If the pNext chain of VkBindImageMemoryInfo includes a VkBindImageMemorySwapchainInfoKHR structure, then that structure includes a swapchain handle and image index indicating that the image will be bound to memory from that swapchain.

The VkBindImageMemorySwapchainInfoKHR structure is defined as:

typedef struct VkBindImageMemorySwapchainInfoKHR {
VkStructureType    sType;
const void*        pNext;
VkSwapchainKHR     swapchain;
uint32_t           imageIndex;
} VkBindImageMemorySwapchainInfoKHR;

Members

• sType is the type of this structure.

• pNext is NULL or a pointer to an extension-specific structure.

• swapchain is VK_NULL_HANDLE or a swapchain handle.

• imageIndex is an image index within swapchain.

Description

If swapchain is not NULL, the swapchain and imageIndex are used to determine the memory that the image is bound to, instead of memory and memoryOffset.

Memory can be bound to a swapchain and use the pDeviceIndices or pSplitInstanceBindRegions members of VkBindImageMemoryDeviceGroupInfo.

Valid Usage
• imageIndex must be less than the number of images in swapchain

Valid Usage (Implicit)
• sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR

• swapchain must be a valid VkSwapchainKHR handle

Host Synchronization
• Host access to swapchain must be externally synchronized