1// Copyright (c) 2018-2022 NVIDIA Corporation.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[[present-barrier]]
6== Present Barrier
7
8The `apiext:VK_NV_present_barrier` extension allows applications to
9synchronize corresponding presentation requests across multiple swapchains
10using the _present barrier_.
11A swapchain is said to be using the _present barrier_ if the swapchain is
12created by adding a slink:VkSwapchainPresentBarrierCreateInfoNV structure to
13the pname:pNext chain of the slink:VkSwapchainCreateInfoKHR structure, and
14setting
15slink:VkSwapchainPresentBarrierCreateInfoNV::pname:presentBarrierEnable to
16true.
17
18A set of corresponding presentation requests is defined as exactly one
19queued presentation request associated with each swapchain using the present
20barrier, whether or not that queued request has executed.
21A given presentation request is added, when created by calling
22flink:vkQueuePresentKHR and specifying a swapchain using the present
23barrier, either to the oldest existing set of corresponding requests for
24which there is no existing member associated with the request's swapcahin,
25or to a new set of corresponding requests if no such set exists.
26
27A set of corresponding requests is said to be _full_ when it contains one
28request from each swapchain using the present barrier.
29Queued presentation of an image to a swapchain using the _present barrier_
30is _deferred_ by the implementation until the set of corresponding requests
31is full, and the visibility operations associated with all requests in that
32set, as described by flink:vkQueuePresentKHR, have completed.
33
34Additionally, the set of swapchains using the present barrier can be in the
35same process, or different processes running under the same operating
36system.
37And if the required synchronization hardware is connected and correctly
38configured, this extension also supports applications to synchronize
39corresponding presentation requests using the _present barrier_ across
40distributed systems.
41However, the configuration mechanism of the required hardware is outside the
42scope of the Vulkan specification and this extension.
43
44[open,refpage='VkSwapchainPresentBarrierCreateInfoNV',desc='specify the present barrier membership of this swapchain',type='structs']
45--
46The slink:VkSwapchainPresentBarrierCreateInfoNV structure is defined as:
47
48include::{generated}/api/structs/VkSwapchainPresentBarrierCreateInfoNV.adoc[]
49
50  * pname:sType is a elink:VkStructureType value identifying this structure.
51  * pname:pNext is `NULL` or a pointer to a structure extending this
52    structure.
53  * pname:presentBarrierEnable is a boolean value indicating a request for
54    using the _present barrier_.
55
56If the pname:pNext chain of slink:VkSwapchainCreateInfoKHR does not include
57this structure, the default value for pname:presentBarrierEnable is
58ename:VK_FALSE, meaning the swapchain does not request to use the present
59barrier.
60Additionally, when recreating a swapchain that was using the present
61barrier, and the pname:pNext chain of slink:VkSwapchainCreateInfoKHR does
62not include this structure, it means the swapchain will stop using the
63present barrier.
64
65include::{generated}/validity/structs/VkSwapchainPresentBarrierCreateInfoNV.adoc[]
66--
67