C Specification
An application can provide timestamps at various stages of its frame generation work by calling:
// Provided by VK_NV_low_latency2
void vkSetLatencyMarkerNV(
VkDevice device,
VkSwapchainKHR swapchain,
const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo);
Parameters
-
device
is the device associated withswapchain
. -
swapchain
is the swapchain to capture timestamps on. -
pSetLatencyMarkerInfo
is a pointer to a VkSetLatencyMarkerInfoNV structure specifying the parameters of the marker to set.
Description
At the beginning and end of simulation and render threads and beginning and
end of vkQueuePresentKHR calls, vkSetLatencyMarkerNV
can be
called to provide timestamps for the application’s reference.
These timestamps are returned with a call to vkGetLatencyTimingsNV
alongside driver provided timestamps at various points of interest with
regards to latency within the application.
As an exception to the normal rules for objects which are externally
synchronized, the swapchain passed to vkSetLatencyMarkerNV
may be
simultaneously used by other threads in calls to functions other than
vkDestroySwapchainKHR.
Access to the swapchain data associated with this extension 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.