1// Copyright 2019-2022 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[open,refpage='VkPresentIdKHR',desc='The list of presentation identifiers',type='structs'] 6-- 7The sname:VkPresentIdKHR structure is defined as: 8 9include::{generated}/api/structs/VkPresentIdKHR.adoc[] 10 11 * pname:sType is the type of this structure. 12 * pname:pNext is `NULL` or a pointer to a structure extending this 13 structure. 14 * pname:swapchainCount is the number of swapchains being presented to the 15 fname:vkQueuePresentKHR command. 16 * pname:pPresentIds is `NULL` or a pointer to an array of uint64_t with 17 pname:swapchainCount entries. 18 If not `NULL`, each non-zero value in pname:pPresentIds specifies the 19 present id to be associated with the presentation of the swapchain with 20 the same index in the flink:vkQueuePresentKHR call. 21 22For applications to be able to reference specific presentation events queued 23by a call to fname:vkQueuePresentKHR, an identifier needs to be associated 24with them. 25When the <<features-presentId, pname:presentId>> feature is enabled, 26applications can: include the sname:VkPresentIdKHR structure in the 27pname:pNext chain of the slink:VkPresentInfoKHR structure to supply 28identifiers. 29 30Each sname:VkSwapchainKHR has a presentId associated with it. 31This value is initially set to zero when the sname:VkSwapchainKHR is 32created. 33 34When a sname:VkPresentIdKHR structure with a non-NULL pname:pPresentIds is 35included in the pname:pNext chain of a slink:VkPresentInfoKHR structure, 36each pname:pSwapchains entry has a presentId associated in the 37pname:pPresentIds array at the same index as the swapchain in the 38pname:pSwapchains array. 39If this presentId is non-zero, then the application can: later use this 40value to refer to that image presentation. 41A value of zero indicates that this presentation has no associated 42presentId. 43A non-zero presentId must: be greater than any non-zero presentId passed 44previously by the application for the same swapchain. 45 46There is no requirement for any precise timing relationship between the 47presentation of the image to the user and the update of the presentId value, 48but implementations should: make this as close as possible to the 49presentation of the first pixel in the new image to the user. 50 51.Valid Usage 52**** 53 * [[VUID-VkPresentIdKHR-swapchainCount-04998]] 54 pname:swapchainCount must: be the same value as 55 sname:VkPresentInfoKHR::pname:swapchainCount, where this 56 sname:VkPresentIdKHR is in the pname:pNext chain of the 57 sname:VkPresentInfoKHR structure 58 * [[VUID-VkPresentIdKHR-presentIds-04999]] 59 Each pname:presentIds entry must: be greater than any previous 60 pname:presentIds entry passed for the associated pname:pSwapchains entry 61**** 62 63include::{generated}/validity/structs/VkPresentIdKHR.adoc[] 64-- 65 66ifdef::VK_KHR_present_wait[] 67include::{chapters}/VK_KHR_present_wait/WaitForPresent.adoc[] 68endif::VK_KHR_present_wait[] 69