1
- // Copyright (c) 2017-2022 Khronos Group.
1
+ // Copyright (c) 2017-2024 Khronos Group.
2
2
//
3
3
// SPDX-License-Identifier: CC-BY-4.0
4
4
5
5
include::{generated}/meta/{refprefix}VK_EXT_present_timing.adoc[]
6
6
7
+ === Other Extension Metadata
8
+
7
9
*Last Modified Date*::
8
- 2020-07-06
10
+ 2024-05-30
9
11
*IP Status*::
10
12
No known IP claims.
11
13
*Contributors*::
@@ -21,9 +23,15 @@ include::{generated}/meta/{refprefix}VK_EXT_present_timing.adoc[]
21
23
- Alon Or-Bach, Samsung
22
24
- Niklas Smedberg, Unity Technologies
23
25
- Tobias Hector, AMD
26
+ - Lionel Duc, NVIDIA
27
+ - Lina Versace, Google
28
+ - Sebastian Wick, Red Hat
29
+ - Jakob Bornecrantz, Collabora
30
+
31
+ === Description
24
32
25
33
This device extension allows an application that uses the
26
- `<< VK_KHR_swapchain>> ` extension to obtain information about the
34
+ `apiext: VK_KHR_swapchain` extension to obtain information about the
27
35
presentation engine's display, to obtain timing information about each
28
36
present, and to schedule a present to happen no earlier than a desired time.
29
37
An application can use this to minimize various visual anomalies (e.g.
@@ -41,7 +49,6 @@ no sooner than a given time.
41
49
This allows the application to avoid stuttering, so the animation looks
42
50
smooth to the user.
43
51
44
-
45
52
include::{generated}/interfaces/VK_EXT_present_timing.adoc[]
46
53
47
54
=== Issues
@@ -61,7 +68,7 @@ pname:refreshDuration is non-zero, at which point the FRR vs. VRR
61
68
indication will also be valid.
62
69
63
70
If the presentation engine's pname:refreshDuration is a fixed value,
64
- the application's image present duration (IPD) must be a multiple of
71
+ the application's image present duration (IPD) should be a multiple of
65
72
pname:refreshDuration.
66
73
That is, the quanta for changing the IPD is pname:refreshDuration.
67
74
For example, if pname:refreshDuration is 16.67ms, the IPD can be
@@ -85,8 +92,6 @@ fixed; but can change over time.
85
92
For example, if a full-screen video player application is visible, the display
86
93
may operate at a 24Hz refresh cycle; and then later switch to 60Hz when
87
94
multiple windows are visible.
88
- The special value of zero for pname:refreshDuration is used to
89
- indicate the condition where the platform cannot yet answer the query.
90
95
91
96
VRR displays on some platforms can also be seen as having different
92
97
characteristics over time.
@@ -96,11 +101,11 @@ display (however that is defined).
96
101
If the application's window is not full-screen-exclusive (e.g. a normal
97
102
multi-window case), the display can look like an FRR display (i.e. because the
98
103
compositor is trying to treat all windows in a consistent manner).
99
- A different issue will deal with these how the timing characteristics
100
- can change over time.
104
+ A different issue will deal with how the timing characteristics can change
105
+ over time.
101
106
102
107
103
- 2) Do we return min/max Values for Refresh Duration for VRR?
108
+ 2) Do we return min/max values for refresh duration for VRR?
104
109
105
110
*PROPOSED*: return only the minimum value of refreshDuration for a VRR.
106
111
@@ -119,8 +124,8 @@ artifacts.
119
124
3) How to deal with changes in timing properties?
120
125
121
126
*RESOLVED*: The slink:VkPastPresentationTimingEXT structure that is
122
- returned by flink:vkGetPastPresentationTimingEXT will contain
123
- pname:timeDomainChanged, which will be ename:VK_TRUE if the time
127
+ returned by flink:vkGetPastPresentationTimingEXT contains
128
+ pname:timeDomainChanged, which is ename:VK_TRUE if the time
124
129
domain enabled for the swapchain is not currently available.
125
130
126
131
An example of why display timing properties can change is if a surface
@@ -140,34 +145,33 @@ visible and VRR otherwise.
140
145
4) One Query for all Timing info vs. an initial query to determine FRR vs. VRR,
141
146
and then FRR-specific vs VRR-specific queries?
142
147
143
- *PROPOSED *: Have one query, as described in issue 1, that can be
148
+ *RESOLVED *: Have one query, as described in issue 1, that can be
144
149
called whenever the application needs to obtain the timing properties
145
150
of the surface.
146
151
147
152
148
- 5) Query to Determine Time Domain ?
153
+ 5) Query to determine time domain ?
149
154
150
- *PROPOSED*: Have a query to determine the time domain.
151
- This extension will define some return values, including some that are
152
- platform-specific.
153
- Other extensions can add other time domains.
155
+ *RESOLVED*: Have a query to determine the time domain.
156
+ This extension defines a basic swapchain-local time domain.
157
+ Other extensions can add other platform-specific time domains.
154
158
155
159
156
- 6) What Time to use for targetPresentTime for Early Images ?
160
+ 6) What time to use for targetPresentTime for early images ?
157
161
158
162
*PROPOSED*: Have no query for determining the current time in the PE’s time
159
- domain; and do allow the special value of zero for targetPresentTime and
160
- idealPresentTime, meaning that there is no target nor ideal time .
163
+ domain; and do allow the special value of zero for targetPresentTime,
164
+ meaning that there is no target.
161
165
162
166
On some platforms, there is no way to determine the current time, nor
163
167
to determine surface timing properties until after at least one image
164
168
has been presented.
165
169
166
170
In such cases, the special value of zero allows the application to
167
171
indicate that timing feedback is desired, but that no
168
- targetPresentTime nor idealPresentTime is requested.
172
+ targetPresentTime is requested.
169
173
Later, once the application has obtained feedback, it can specify
170
- targetPresentTime and idealPresentTime .
174
+ targetPresentTime by using the result's actualPresentTime .
171
175
172
176
173
177
7) How long before an application’s request for new image duration is honored?
@@ -188,68 +192,48 @@ The first time (from the call till the image is presented) generally doesn’t
188
192
matter, because the application will likely be providing a targetPresentTime
189
193
(i.e. the application may have some indication for how long this will be).
190
194
However, the latency between targetPresentTime until feedback is available may
191
- be much long .
195
+ be much longer .
192
196
For example, on Android on the 1st-generation Pixel phone (60Hz FRR display),
193
197
the latency was approximately 5 refresh cycles (83.33ms).
194
198
For higher-frequency displays, the latency may have a larger number of refresh
195
199
cycles.
196
200
197
- Is there value in having a query for the application to know how long it may
198
- have to wait for feedback?
199
- Can such a query be reasonably answered by the driver?
200
-
201
- Is there other interesting information in this space that we may wish to
202
- capture?
201
+ Can such a query be reasonably answered by the driver? Is there other
202
+ interesting information in this space that we may wish to capture?
203
203
204
204
205
205
9) Do we have a query(s) about the number of VkPastPresentationTimingEXT
206
206
structs to keep?
207
207
208
- *UNRESOLVED*: At the Montreal F2F, there was discussion about how much
209
- feedback that the driver needs to keep and/or how much feedback that
210
- the application needs to be able to query.
211
-
212
- The way that the LunarG cube demo (official WSI example code) used
213
- VK_GOOGLE_display_timing, and what is proposed for the new extension is that
214
- the application query what feedback is available during every render-present
215
- loop.
216
- If the application never skips querying for feedback, and always obtains
217
- whatever feedback is available, there doesn’t seem much need for such a
218
- query(s).
219
- What I saw with the cube demo on a Pixel phone was that most of the time, the
220
- application obtained feedback for 1 previous present.
221
- Occasionally, it would get 2 VkPastPresentationTimingEXT structs on time and
222
- then 0 the next (or vice versa).
223
-
224
- Perhaps, a video player application might present several images at once, and
225
- then later get feedback for several images at the same time.
226
- That would be the most-likely use-case that I can come up with for why a query
227
- might be useful.
228
- Is that compelling enough?
229
-
230
- What might the model for the query(s) be?
231
- Potentially the application can tell the driver how many presents it might do
232
- at a time, and the driver can use that to size its internal buffer.
233
- Is there value in having a query that would influence the driver’s behavior
234
- (beyond what’s provided for in the currently-proposed API)?
208
+ *PROPOSED*: Let the application specify at swapchain creation how many
209
+ results the swapchain is allowed to store before querying them with
210
+ vkGetPastPresentationTimingEXT.
211
+
235
212
236
213
10) How is the SWAPCHAIN_LOCAL time domain used with the calibrated
237
214
timestamps extension?
238
215
239
- PROPOSED: Define a struct to chain into VkCalibratedTimestampInfoEXT::pNext
216
+ * PROPOSED* : Define a struct to chain into VkCalibratedTimestampInfoEXT::pNext
240
217
that specifies a swapchain.
241
218
Is anything additional needed for
242
219
vkGetPhysicalDeviceCalibrateableTimeDomainsEXT, or are swapchain-local
243
220
timestamps always calibrateable or always not calibrateable for a given
244
221
device?
245
222
223
+
246
224
11) Should VK_PRESENT_MODE_FIFO_LATEST_READY_EXT be part of this extension,
247
225
or split out into its own extension?
248
226
249
- PROPOSED : It is only tangentially related.
227
+ *RESOLVED* : It is only tangentially related.
250
228
Split it out into its own extension and define the interaction here.
251
229
252
230
=== Version History
253
231
254
232
* Revision 1, 2018-05-11 (Ian Elliott)
255
- ** Internal revisions
233
+ ** Internal revisions.
234
+
235
+ * Revision 2, 2022-11-30 (Lionel Duc)
236
+ ** Rebase for public discussions.
237
+
238
+ * Revision 3, 2024-05-29 (Lionel Duc)
239
+ ** Public revisions.
0 commit comments