1// Copyright 2019-2022 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[open,refpage='VkSwapchainPresentFenceInfoEXT',desc='Fences associated with a vkQueuePresentKHR operation',type='structs'] 6-- 7The sname:VkSwapchainPresentFenceInfoEXT structure is defined as: 8 9include::{generated}/api/structs/VkSwapchainPresentFenceInfoEXT.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 by 15 this command. 16 * pname:pFences is a list of fences with pname:swapchainCount entries. 17 Each entry must: be dlink:VK_NULL_HANDLE or the handle of a fence to 18 signal when the relevant operations on the associated swapchain have 19 completed. 20 21The set of _queue operations_ defined by queuing an image for presentation, 22as well as operations performed by the presentation engine access the 23payloads of objects associated with the presentation operation. 24The associated objects include: 25 26 * The swapchain image, its implicitly bound memory, and any other 27 resources bound to that memory. 28 * The wait semaphores specified when queuing the image for presentation. 29 30The application can: provide a fence that the implementation will signal 31when all such queue operations have completed and the presentation engine 32has taken a reference to the payload of any objects it accesses as part of 33the present operation. 34For all 35ifdef::VK_KHR_timeline_semaphore[binary] 36wait semaphores imported by the presentation engine using the equivalent of 37reference transference, as described in 38<<synchronization-semaphores-importing,Importing Semaphore Payloads>>, this 39fence must: not signal until all such semaphore payloads have been reset by 40the presentation engine. 41 42The application can: destroy the wait semaphores associated with a given 43presentation operation when the associated fence is signaled, and can: 44destroy the swapchain when the fences associated with all past presentation 45requests have signaled. 46 47Fences associated with presentations to the same swapchain on the same 48slink:VkQueue must: be signaled in the same order as the present operations. 49 50To specify a fence for each swapchain in a present operation, include the 51sname:VkSwapchainPresentFenceInfoEXT structure in the pname:pNext chain of 52the slink:VkPresentInfoKHR structure. 53 54.Valid Usage 55**** 56 * [[VUID-VkSwapchainPresentFenceInfoEXT-swapchainCount-07757]] 57 pname:swapchainCount must: be equal to 58 slink:VkPresentInfoKHR::pname:swapchainCount 59 * [[VUID-VkSwapchainPresentFenceInfoEXT-pFences-07758]] 60 Each element of pname:pFences must: be unsignaled 61 * [[VUID-VkSwapchainPresentFenceInfoEXT-pFences-07759]] 62 Each element of pname:pFences must: not be associated with any other 63 queue command that has not yet completed execution on that queue 64**** 65 66include::{generated}/validity/structs/VkSwapchainPresentFenceInfoEXT.adoc[] 67-- 68