VkPresentId2KHR
The VkPresentId2KHR structure is defined as:
typedef struct VkPresentId2KHR {
VkStructureType sType;
const void* pNext;
uint32_t swapchainCount;
const uint64_t* pPresentIds;
} VkPresentId2KHR;
pub struct PresentId2KHR {
s_type: vk::StructureType,
p_next: *const c_void,
swapchain_count: u32, // Copy of VkPresentInfoKHR::swapchainCount
p_present_ids: *const u64, // Present ID values for each swapchain
}
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.swapchainCountis the number of swapchains being presented to the vkQueuePresentKHR command.pPresentIdsisNULLor a pointer to an array of uint64_t withswapchainCountentries. If notNULL, each non-zero value inpPresentIdsspecifies the present id to be associated with the presentation of the swapchain with the same index in the vkQueuePresentKHR call.
For applications to be able to reference specific presentation events queued by a call to vkQueuePresentKHR, an identifier needs to be associated with them.
When the VkSurfaceCapabilitiesPresentId2KHR surface capability is
present for a surface, applications can include the VkPresentId2KHR
structure in the pNext chain of the VkPresentInfoKHR structure
to associate an identifier with each presentation request.
The pPresentIds provides an identifier for the swapchain present at
the corresponding index in VkPresentInfoKHR’s pSwapchains array.
If this presentId is non-zero, then the application can later use this value to refer to that image presentation. A value of zero indicates that this presentation has no associated presentId. A non-zero presentId must be greater than any non-zero presentId passed previously by the application for the same swapchain.
If a non-zero presentId was provided, this may be used with vkWaitForPresent2KHR for the application to synchronize against the presentation engine’s processing of the presentation request.
Valid Usage
VUID-VkPresentId2KHR-swapchainCount-10818
swapchainCount must be the same value as
VkPresentInfoKHR::swapchainCount, where this
VkPresentId2KHR is in the pNext chain of the
VkPresentInfoKHR structure
VUID-VkPresentId2KHR-presentIds-10819
Each non-zero entry in presentIds must be greater than all
previously submitted present ids for the associated swapchain in
VkPresentInfoKHR::pSwapchains
VUID-VkPresentId2KHR-None-10820
The swapchain must have been created with
VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR bit set in the
VkSwapchainCreateFlagBitsKHR field
Valid Usage (Implicit)
VUID-VkPresentId2KHR-sType-sType
sType must be VK_STRUCTURE_TYPE_PRESENT_ID_2_KHR
VUID-VkPresentId2KHR-pPresentIds-parameter
If pPresentIds is not NULL, pPresentIds must be a valid pointer to an array of swapchainCount uint64_t values
VUID-VkPresentId2KHR-swapchainCount-arraylength
swapchainCount must be greater than 0