VK_KHR_swapchain extension to obtain information about the presentation engine’s display, to obtain timing information about each present, and to schedule a present to happen no earlier than a desired time. An application can use this to minimize various visual anomalies (e.g. stuttering).
Traditional game and real-time animation applications need to correctly position their geometry for when the presentable image will be presented to the user. To accomplish this, applications need various timing information about the presentation engine’s display. They need to know when presentable images were actually presented, and when they could have been presented. Applications also need to tell the presentation engine to display an image no sooner than a given time. This allows the application to avoid stuttering, so the animation looks smooth to the user.
This extension treats variable-refresh-rate (VRR) displays as if they are fixed-refresh-rate (FRR) displays.
The example code for the this extension (like the VK_KHR_surface and VK_GOOGLE_display_timing extensions) is contained in the cube demo that is shipped with the official Khronos SDK, and is being kept up-to-date in that location (see: https://github.com/KhronosGroup/Vulkan-Tools/blob/master/cube/cube.c ).
VK_GOOGLE_display_timingVK_KHR_swapchain| Modifier and Type | Field and Description |
|---|---|
| public static final String | VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME
The extension name. |
| public static final int | VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION
The extension specification version. |
| public static final int | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE
Extends |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static int | nvkGetPastPresentationTimingGOOGLE(VkDevice device, long swapchain, long
a pointer to an integer related to the number of pPresentationTimingCount, long pPresentationTimings)VkPastPresentationTimingGOOGLE structures to query, as described below.Unsafe version of: |
| public static int | nvkGetRefreshCycleDurationGOOGLE(VkDevice device, long swapchain, long pDisplayTimingProperties)
Unsafe version of: |
| public static int | vkGetPastPresentationTimingGOOGLE(VkDevice
the device associated with device, long swapchain.the swapchain to obtain presentation timing information duration for. swapchain, IntBuffer a pointer to an integer related to the number of pPresentationTimingCount, VkPastPresentationTimingGOOGLE.VkPastPresentationTimingGOOGLE structures to query, as described below.either pPresentationTimingsNULL or a pointer to an array of VkPastPresentationTimingGOOGLE structures.Obtain timing of a previously-presented image. |
| public static int | vkGetPastPresentationTimingGOOGLE(VkDevice device, long swapchain, int[] pPresentationTimingCount, VkPastPresentationTimingGOOGLE.
Array version of: |
| public static int | vkGetRefreshCycleDurationGOOGLE(VkDevice
the device associated with device, long swapchain.the swapchain to obtain the refresh duration for. swapchain, VkRefreshCycleDurationGOOGLE a pointer to a pDisplayTimingProperties)VkRefreshCycleDurationGOOGLE structure.Obtain the RC duration of the PE’s display. |
| VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME | back to summary |
|---|---|
| public static final String VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME The extension name. | |
| VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION | back to summary |
|---|---|
| public static final int VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION The extension specification version. | |
| VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE Extends | |
| GOOGLEDisplayTiming | back to summary |
|---|---|
| protected GOOGLEDisplayTiming() | |
| nvkGetPastPresentationTimingGOOGLE | back to summary |
|---|---|
| public static int nvkGetPastPresentationTimingGOOGLE(VkDevice device, long swapchain, long pPresentationTimingCount, long pPresentationTimings) Unsafe version of:
| |
| nvkGetRefreshCycleDurationGOOGLE | back to summary |
|---|---|
| public static int nvkGetRefreshCycleDurationGOOGLE(VkDevice device, long swapchain, long pDisplayTimingProperties) Unsafe version of: | |
| vkGetPastPresentationTimingGOOGLE | back to summary |
|---|---|
| public static int vkGetPastPresentationTimingGOOGLE(VkDevice device, long swapchain, IntBuffer pPresentationTimingCount, VkPastPresentationTimingGOOGLE. Obtain timing of a previously-presented image. C SpecificationThe implementation will maintain a limited amount of history of timing information about previous presents. Because of the asynchronous nature of the presentation engine, the timing information for a given To asynchronously query the presentation engine, for newly-available timing information about one or more previous presents to a given swapchain, call:
DescriptionIf Valid Usage (Implicit)
Host Synchronization
Return Codes
See Also
| |
| vkGetPastPresentationTimingGOOGLE | back to summary |
|---|---|
| public static int vkGetPastPresentationTimingGOOGLE(VkDevice device, long swapchain, int[] pPresentationTimingCount, VkPastPresentationTimingGOOGLE. Array version of:
| |
| vkGetRefreshCycleDurationGOOGLE | back to summary |
|---|---|
| public static int vkGetRefreshCycleDurationGOOGLE(VkDevice device, long swapchain, VkRefreshCycleDurationGOOGLE pDisplayTimingProperties) Obtain the RC duration of the PE’s display. C SpecificationTo query the duration of a refresh cycle (RC) for the presentation engine’s display, call:
Valid Usage (Implicit)
Host Synchronization
Return Codes
See Also
| |