Commit bb1314e
Add the VK_EXT_present_timing extension (#1364)
* WIP: Add the VK_EXT_present_timing extension
This extension allows an application that uses the
VK_KHR_swapchain extension to obtain information
about the presentation engine's display, to obtain
timing information about each present operation,
and to schedule a present to happen at a specific
time. Applications can use this to minimize
various visual anomalies (e.g., stuttering).
* Major rebase and updates to the original proposal
This change rebases the original extension on main. It also
brings many modifications from discussions within the Khronos SI
group and this MR:
- Add a proposal document
- Rely on VK_KHR_present_id to identify presents
- Split out VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
- Add physical device and surface capabilities
- Define "presentation" as a set of well-defined multiple steps
- Explicitly describe the internal results queue interactions
- Add many per-present parameters, allowing to remove swapchain state
- Refine VRR support
- Cleanup appendix and update contributors
- Replace present slop with a flag to round to nearest refresh cycle
- Refine mechanisms for feedback about time domains and timing properties updates
- Allow timing results to be returned incomplete and out of order
* Address latest review feedback
- Time Domains
- Rename vkGetSwapchainTimeDomainsEXT -> vkGetSwapchainTimeDomainPropertiesEXT
- Add a version counter to the time domains for consistency with timing properties
- Change VkSwapchainTimeDomainPropertiesEXT to hold a list of time domains
- Change parameters of vkGetPastPresentationTimingEXT to use new structs
* Mark some issues as resolved.
Also fix some boilerplate language / copyright.
* Add interaction with VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
* Fix latest spec build issues
- Copyright date fix
- Finish renaming minPresentDuration -> presentDuration
- Add missing VkStructureType and fix spec language
* Fix new consistency checks after rebase
* Remove unused VkStructureType
Also reorder structure types to be consistent with most other extensions.
Fix some structures using old VkTimeDomainEXT instead of promoted VkTimeDomainKHR.
* Change reserved swapchain create flag bit after rebase
* Add flags to control present timing queries
Update code examples accordingly
* First pass at remaining issues
- Removed VK_PRESENT_STAGE_IMAGE_LATCHED_BIT_EXT as we couldn't
agree on its semantics. Replaced with VK_PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT
which should be clearer, as "dequeue"'ing a request is already
mentioned in the spec.
- Swapchains that require presents to be made before being able to
return timing properties should now return VK_NOT_READY from
vkGetSwapchainTimingPropertiesEXT
- Renamed "variableRefreshDelay" to "refreshInterval". Spec wording is still
a bit fuzzy, but this allows to express scenarios where the vblank interval is
decoupled from the display's true refresh rate, like Android's ARR.
- VkPastPresentationTimingEXT now also reports the targetTime that was
provided by the app. This is a usability thing that avoids the need
to keep track of previous present times in the app.
- Removed targetPresentStage: it didn't make sense from API perspective. Presentation
engine now makes a "best effort" approach to hit
VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT with the target present time. This is
unfortunately the best we can do at the moment due to multiple platforms
restrictions. As a result, presentAtNearestRefreshCycle is now merely a hint instead
of a requirement.
- Added description for the remaining issues in the proposal
- Move vkGetSwapchain*PropertiesEXT optional counter parameter at the end.
This is closer to the overall API style and fixes issues with vulkan.hpp generation.
- Reference VK_KHR_present_id2 instead of VK_KHR_present_id
- Cleanup VkPresentTimingInfo
Remove the VkPresentTimeEXT union, as it does not fit the style of Vulkan
Remove boolean members and replace them with a new flags type.
Cleanup some spec language and VUs.
* Fix new [NOTE] styling
* Typo fixes
* Proofreading pass.
Fixed a few inconsistencies in member names, parameter orders, etc.
* Add an 'unknown' value for VkSwapchainTimingPropertiesEXT::refreshInterval
* Fix oversight for target present times using a stage-local time domain
When using a VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT time domain to
specify absolute present times, it was impossible to specify which
stage to reference.
* Fix proposal header to match new style
* Proofreading pass.
Explicitly state that targetTime may also be a duration in a few places.
* Clarify vkGetPastPresentationTimingEXT behavior for returned present stage results.
Also remove the by-present-id requests and add proper VUs for presentStageCount.
* Fix present timing's swapchain createInfo bit position.
The extension did not preempt a createInfo bit back then, and it hasn't come up
frequently. I will reserve bit 9 in a separate PR.
* Fix old style writing identified by CI
* Fix presentAt device features to be optional in the xml
* Mark ratified
---------
Co-authored-by: Ian Elliott <[email protected]>
Co-authored-by: Lionel Duc <[email protected]>
Co-authored-by: Jon Leech <[email protected]>1 parent 69b9214 commit bb1314e
File tree
12 files changed
+2013
-102
lines changed- appendices
- chapters
- VK_EXT_present_timing
- VK_GOOGLE_display_timing
- VK_KHR_surface
- VK_KHR_swapchain
- proposals
- scripts
- xml
12 files changed
+2013
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
830 | 835 | | |
831 | 836 | | |
832 | 837 | | |
| |||
924 | 929 | | |
925 | 930 | | |
926 | 931 | | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
927 | 945 | | |
928 | 946 | | |
929 | 947 | | |
| |||
1142 | 1160 | | |
1143 | 1161 | | |
1144 | 1162 | | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
1145 | 1168 | | |
1146 | 1169 | | |
1147 | 1170 | | |
| |||
1733 | 1756 | | |
1734 | 1757 | | |
1735 | 1758 | | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
1736 | 1764 | | |
1737 | 1765 | | |
1738 | 1766 | | |
| |||
1755 | 1783 | | |
1756 | 1784 | | |
1757 | 1785 | | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1758 | 1797 | | |
1759 | 1798 | | |
1760 | 1799 | | |
| |||
0 commit comments