vkGetPastPresentationTimingEXT(3)
C Specification
Because of the asynchronous nature of the presentation engine, the timing information for a given vkQueuePresentKHR command may only becomes available some time after the presentation has occurred. These time values should be asynchronously queried, and are returned if available. All time values are in nanoseconds, according to the time-domain being used.
To asynchronously query the presentation engine for newly-available timing information about one or more previous presents to a given swapchain, call:
// Provided by VK_EXT_present_timing
VkResult vkGetPastPresentationTimingEXT(
VkDevice device,
const VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfo,
VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties);
Parameters
-
deviceis the device associated withswapchain. -
pPastPresentationTimingInfois a pointer to an instance of the VkPastPresentationTimingInfoEXT structure. -
pPastPresentationTimingPropertiesis a pointer to an instance of the VkPastPresentationTimingPropertiesEXT structure.
Description
If upon return the value of
VkPastPresentationTimingPropertiesEXT::presentationTimingCount
is less than the number of available timing records for the given
VkPastPresentationTimingInfoEXT::swapchain, VK_INCOMPLETE
is returned instead of VK_SUCCESS to indicate that not all the
available values were returned.
Upon return, zero or more slots of the swapchain internal timing
results queue, equal to the number of entries written to
VkPastPresentationTimingPropertiesEXT::pPresentationTimings for
which reportComplete is VK_TRUE, are made available for future
vkQueuePresentKHR calls.
Elements of pPresentationTimings are arranged in ascending order of
present ids.
Timing information may become available out of order with regards to their
associated vkQueuePresentKHR order.
VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT can be
set in VkPastPresentationTimingInfoEXT::flags to allow
vkGetPastPresentationTimingEXT to return results in that same order.
Otherwise, results are returned in the order of their associated
vkQueuePresentKHR calls.
There is no requirement for any precise timing relationship between the completion of a present stage and the availability of any associated timing information. However, results must be made available in finite time.
As an exception to the normal rules for objects which are externally
synchronized, swapchain may be simultaneously used by other threads
in calls to functions other than vkDestroySwapchainKHR and
vkCreateSwapchainKHR with swapchain used as an
oldSwapchain.
Access to the swapchain timing information must be atomic within the
implementation.
Document Notes
For more information, see the Vulkan Specification.
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.