1
- // Copyright (c) 2014-2024 Khronos Group.
1
+ // Copyright (c) 2014-2025 Khronos Group.
2
2
//
3
3
// SPDX-License-Identifier: CC-BY-4.0
4
4
@@ -27,41 +27,26 @@ include::{generated}/api/structs/VkPresentTimingsInfoEXT.adoc[]
27
27
information for the presentation of the image corresponding to the entry
28
28
in the sname:VkPresentInfoKHR::pname:pImageIndices array.
29
29
30
- The semantics of target presentation time or duration vary depending on the presentation mode:
31
-
32
- * ename:VK_PRESENT_MODE_FIFO_KHR.
33
- Tearing cannot: be observed.
34
- The first queued image is dequeued and presented if
35
- both: 1) its associated wait semaphore(s) have signaled, and 2)
36
- its target present time is less-than or equal-to the current time.
37
- * ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR.
38
- For images that are presented in time to be displayed at the next
39
- vertical blanking period, the semantics are identical as for
40
- ename:VK_PRESENT_MODE_FIFO_KHR.
41
- For images that are presented late, and are displayed after the start of
42
- the vertical blanking period (i.e. with tearing), the values of
43
- sname:VkPastPresentationTimingEXT may: be treated as if the image was
44
- displayed at the start of the vertical blanking period, or may: be
45
- treated the same as for ename:VK_PRESENT_MODE_IMMEDIATE_KHR.
46
-
47
- Other presentation modes do not support a target presentation time or duration.
48
-
49
30
.Valid Usage
50
31
****
51
- * pname:swapchainCount must: be the same value as
52
- sname:VkPresentInfoKHR::pname:swapchainCount, where
53
- sname:VkPresentInfoKHR is in the pname:pNext chain of this
54
- sname:VkPresentTimingsInfoEXT structure.
32
+ * pname:swapchainCount must: be equal to
33
+ slink:VkPresentInfoKHR::pname:swapchainCount.
34
+ * All swapchains in slink:VkPresentInfoKHR::pname:pSwapchains must: have
35
+ been created with the slink:VkSwapchainCreateInfoKHR::pname:flags field
36
+ containing ename:VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT
55
37
* For each member of sname:VkPresentInfoKHR::pname:pSwapchains, if the
56
- associated sname:VkPresentTimeEXT is non-zero, the current present mode
57
- must: be ename:VK_PRESENT_MODE_FIFO_KHR or
38
+ associated slink:VkPresentTimingInfoEXT::pname:targetTime is not zero,
39
+ the swapchain's current present mode must: be
40
+ ifdef::VK_KHR_present_mode_fifo_latest_ready[]
41
+ ename:VK_PRESENT_MODE_FIFO_LATEST_READY_KHR,
42
+ endif::VK_KHR_present_mode_fifo_latest_ready[]
43
+ ename:VK_PRESENT_MODE_FIFO_KHR or
58
44
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR.
59
45
****
60
46
61
47
include::{generated}/validity/structs/VkPresentTimingsInfoEXT.adoc[]
62
48
--
63
49
64
-
65
50
[open,refpage='VkPresentTimingInfoEXT',desc='Specifies per-present timing information',type='structs']
66
51
--
67
52
The sname:VkPresentTimingInfoEXT structure is defined as:
@@ -71,77 +56,96 @@ include::{generated}/api/structs/VkPresentTimingInfoEXT.adoc[]
71
56
* pname:sType is a elink:VkStructureType value identifying this structure.
72
57
* pname:pNext is `NULL` or a pointer to a structure extending this
73
58
structure.
74
- * pname:time is a sname:VkPresentTimeEXT specifying the target present
75
- time or duration of the presentation request.
59
+ * pname:flags is a bitmask of elink:VkPresentTimingInfoFlagBitsEXT
60
+ specifying options for how to interpret the timing information.
61
+ * pname:targetTime is zero or a value specifying the target present
62
+ time in nanoseconds of the presentation request.
76
63
* pname:timeDomainId is the id of the time domain used to specify the
77
64
absolute target present time and the timing results obtained in a
78
65
subsequent flink:vkGetPastPresentationTimingEXT call for the current
79
66
presentation request.
80
67
* pname:presentStageQueries is a valid tlink:VkPresentStageFlagsEXT value
81
- indicating which present stages the presentation engine should collect
68
+ indicating which present stages the presentation engine will collect
82
69
timing information for.
83
- * pname:targetPresentStage is zero or a tlink:VkPresentStageFlagsEXT value
84
- specifying which present stage pname:time is targeting.
85
- * pname:presentAtRelativeTime specifies whether pname:time is to be
86
- interpreted as an absolute or a relative time value.
87
- * pname:presentAtNearestRefreshCycle is a flag indicating that the
88
- application would like the presentation engine to complete
89
- pname:targetPresentStage at the start of the refresh cycle that is
90
- closest to pname:time.
91
-
92
- If pname:targetPresentStage is not zero, the presentation engine must: not
93
- complete the target present stage before the absolute time specified in
94
- pname:time according to the time domain used, unless
95
- pname:presentAtNearestRefreshCycle is ename:VK_TRUE and pname:time falls
96
- within the first half of a refresh cycle.
70
+
71
+ If pname:targetTime is not zero, the implementation attempts to align the
72
+ ename:VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT present stage of
73
+ that presentation request with the time specified in pname:targetTime
74
+ according to the time domain used. If
75
+ ename:VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT is not
76
+ set in pname:flags, it indicates that the application would strictly prefer
77
+ the image to not be visible before pname:targetTime has lapsed.
78
+
79
+ [NOTE]
80
+ .Note
81
+ ====
82
+ Some platforms, due to hardware or system limitations, may: not be able to
83
+ accurately time pname:targetTime with the actual physical event of the image
84
+ becoming visible on the display. However, those timing capabilities may:
85
+ still be useful and result in improved animation quality.
86
+
87
+ As such, the <<features-presentAtAbsoluteTime, pname:presentAtAbsoluteTime>>
88
+ and <<features-presentAtRelativeTime, pname:presentAtRelativeTime>> features
89
+ do not provide a strict guarantee regarding the completion of the
90
+ ename:VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT present stage
91
+ relative to the pname:targetTime, and implementations must: strive to make
92
+ it as consistent and accurate as possible.
93
+ ====
97
94
98
95
[NOTE]
99
96
.Note
100
97
====
101
- Applications that use pname:targetPresentTime to specify an absolute present
102
- time should: regularly rebase their calculations for their next target time
103
- on the feedback from flink:vkGetPastPresentationTimingEXT to compensate for
104
- accumulated precision errors or potential clock drift. It is recommended
105
- that when targeting the time of a vertical blanking period, applications use
106
- pname:presentAtNearestRefreshCycle to allow the implementation to compensate
107
- for small precision errors that may cause an image to be displayed one
108
- refresh cycle later than intended.
98
+ Applications that specify an absolute present time should: regularly rebase
99
+ their calculations for their next target time on the feedback from
100
+ flink:vkGetPastPresentationTimingEXT to compensate for accumulated precision
101
+ errors or potential clock drift. It is recommended that when targeting the
102
+ time of a vertical blanking period, applications use pname:presentAtNearestRefreshCycle
103
+ to allow the implementation to compensate for small precision errors that may
104
+ cause an image to be displayed one refresh cycle later than intended.
109
105
====
110
106
111
107
.Valid Usage
112
108
****
113
- * If pname:presentStageTarget is not zero, it must: specify one and only
114
- one stage.
115
- * pname:presentStageTarget must: not be
116
- ename:VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT
117
- * If pname:targetPresentStage is not zero, pname:presentAtRelativeTime must:
118
- be ename:VK_FALSE.
119
- * If pname:presentAtRelativeTime is ename:VK_TRUE, the
109
+ * If pname:targetTime is not zero and pname:flags does not contain
110
+ ename:VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT, the
111
+ <<features-presentAtAbsoluteTime, pname:presentAtAbsoluteTime>> feature
112
+ must: be enabled.
113
+ * If pname:targetTime is not zero and pname:flags contains
114
+ ename:VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT, the
120
115
<<features-presentAtRelativeTime, pname:presentAtRelativeTime>> feature
121
116
must: be enabled.
122
117
****
123
118
124
119
include::{generated}/validity/structs/VkPresentTimingInfoEXT.adoc[]
125
120
--
126
121
127
-
128
- [open,refpage='VkPresentTimeEXT',desc='Specifying when an image should be presented',type='structs']
122
+ [open,refpage='VkPresentTimingInfoFlagBitsEXT',desc='Bitmask specifying present timing info flags',type='enums']
123
+ --
124
+ Bits which can: be set in slink:VkPresentTimingInfoEXT::pname:flags, specifying options
125
+ for how to interpret timing information:
126
+
127
+ include::{generated}/api/enums/VkPresentTimingInfoFlagBitsEXT.adoc[]
128
+
129
+ * ename:VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT specifies
130
+ that sname:VkPresentTimingInfoEXT::pname:targetTime is to be interpreted
131
+ as a relative time from the previous presentation's
132
+ ename:VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT stage. If the
133
+ pname:swapchain has never been used to present an image, the provided
134
+ pname:targetTime is ignored.
135
+ * ename:VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT
136
+ specifies that the application would prefer the image to be presented
137
+ earlier than the time specified in
138
+ sname:VkPresentTimingInfoEXT::pname:targetTime if that time falls within
139
+ the first half of a refresh cycle. In that case, the presentation engine
140
+ may: choose to display the image at the start of that refresh cycle.
129
141
--
130
142
131
- The sname:VkPresentTimeEXT union is defined as:
132
-
133
- include::{generated}/api/structs/VkPresentTimeEXT.adoc[]
134
-
135
- * pname:targetPresentTime, if non-zero, specifies the earliest time in
136
- nanoseconds the application wants the presentation engine to complete a
137
- specified target present stage. A value of zero specifies that the
138
- presentation engine may: display the image at any time allowed by the
139
- current present mode.
140
- * pname:presentDuration specifies the minimum duration in nanoseconds that
141
- must: separate the ename:VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT
142
- present stages of the current and the next presentation requests, if any.
143
+ [open,refpage='VkPresentTimingInfoFlagsEXT',desc='Bitmask of VkPresentTimingInfoFlagBitsEXT',type='flags']
144
+ --
145
+ include::{generated}/api/flags/VkPresentTimingInfoFlagsEXT.adoc[]
143
146
144
- include::{generated}/validity/structs/VkPresentTimeEXT.adoc[]
147
+ tname:VkPresentTimingInfoFlagsEXT is a bitmask type for setting a mask
148
+ of zero or more elink:VkPresentTimingInfoFlagBitsEXT.
145
149
--
146
150
147
151
[open,refpage='VkPresentStageFlagBitsEXT',desc='Bitmask specifying stages of the image presentation process',type='enums']
@@ -155,9 +159,10 @@ include::{generated}/api/enums/VkPresentStageFlagBitsEXT.adoc[]
155
159
* ename:VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT marks the end of the
156
160
set of queue operations enqueued by flink:vkQueuePresentKHR on the provided
157
161
sname:VkQueue for a presentation request.
158
- * ename:VK_PRESENT_STAGE_IMAGE_LATCHED_BIT_EXT is the stage after which the
159
- image associated with the presentation request has been latched by the
160
- presentation engine to create the presentation of a future refresh cycle.
162
+ * ename:VK_PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT is the stage after which
163
+ the presentation request has been dequeued from the swapchain's internal
164
+ presentation request queue, if any, as specified by the present mode
165
+ associated with that request.
161
166
* ename:VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT is the stage after
162
167
which data for the first pixel of the presentation request associated with
163
168
the image has left the presentation engine for a display hardware.
0 commit comments