• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019-2022 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[open,refpage='VkSwapchainPresentModeInfoEXT',desc='Presentation modes for a vkQueuePresentKHR operation',type='structs']
6--
7The sname:VkSwapchainPresentModeInfoEXT structure is defined as:
8
9include::{generated}/api/structs/VkSwapchainPresentModeInfoEXT.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:pPresentModes is a list of presentation modes with
17    pname:swapchainCount entries.
18
19If the pname:pNext chain of slink:VkPresentInfoKHR includes a
20sname:VkSwapchainPresentModeInfoEXT structure, then that structure defines
21the presentation modes used for the current and subsequent presentation
22operations.
23
24When the application changes present modes with
25slink:VkSwapchainPresentModeInfoEXT, images that have already been queued
26for presentation will continue to be presented according to the previous
27present mode.
28The current image being queued for presentation and subsequent images will
29be presented according to the new present mode.
30The behavior during the transition between the two modes is defined as
31follows.
32
33ifdef::VK_KHR_shared_presentable_image[]
34  * Transition from ename:VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR to
35    ename:VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR: the presentation engine
36    updates the shared presentable image according to the behavior of
37    ename:VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR.
38  * Transition from ename:VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR to
39    ename:VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR: the presentation
40    engine may: update the shared presentable image or defer that to its
41    regular refresh cycle, according to the behavior of
42    ename:VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR.
43endif::VK_KHR_shared_presentable_image[]
44  * Transition between ename:VK_PRESENT_MODE_FIFO_KHR and
45    ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR: Images continue to be appended
46    to the same FIFO queue, and the behavior with respect to waiting for
47    vertical blanking period will follow the new mode for current and
48    subsequent images.
49  * Transition from ename:VK_PRESENT_MODE_IMMEDIATE_KHR to
50    ename:VK_PRESENT_MODE_FIFO_KHR or
51    ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR: As all prior present requests in
52    the ename:VK_PRESENT_MODE_IMMEDIATE_KHR mode are applied immediately,
53    there are no outstanding present operations in this mode, and current
54    and subsequent images are appended to the FIFO queue and presented
55    according to the new mode.
56  * Transition from ename:VK_PRESENT_MODE_MAILBOX_KHR to
57    ename:VK_PRESENT_MODE_FIFO_KHR or
58    ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR: Presentation in both modes
59    require waiting for the next vertical blanking period, with
60    ename:VK_PRESENT_MODE_MAILBOX_KHR allowing the pending present operation
61    to be replaced by a new one.
62    In this case, the current present operation will replace the pending
63    present operation and is applied according to the new mode.
64  * Transition from ename:VK_PRESENT_MODE_FIFO_KHR or
65    ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR to
66    ename:VK_PRESENT_MODE_IMMEDIATE_KHR or
67    ename:VK_PRESENT_MODE_MAILBOX_KHR: If the FIFO queue is empty,
68    presentation is done according to the behavior of the new mode.
69    If there are present operations in the FIFO queue, once the last present
70    operation is performed based on the respective vertical blanking period,
71    the current and subsequent updates are applied according to the new
72    mode.
73  * The behavior during transition between any other present modes, if
74    possible, is implementation defined.
75
76.Valid Usage
77****
78  * [[VUID-VkSwapchainPresentModeInfoEXT-swapchainCount-07760]]
79    pname:swapchainCount must: be equal to
80    slink:VkPresentInfoKHR::pname:swapchainCount
81  * [[VUID-VkSwapchainPresentModeInfoEXT-pPresentModes-07761]]
82    Each entry in pname:pPresentModes must be a presentation mode specified
83    in slink:VkSwapchainPresentModesCreateInfoEXT::pPresentModes when
84    creating the entry's corresponding swapchain
85****
86
87include::{generated}/validity/structs/VkSwapchainPresentModeInfoEXT.adoc[]
88--
89