Function Prototype

vkSetLatencyMarkerNV

Pass in marker for timing info

An application can provide timestamps at various stages of its frame generation work by calling:

void vkSetLatencyMarkerNV(
    VkDevice device,
    VkSwapchainKHR swapchain,
    const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo);
  • device is the device associated with swapchain.
  • swapchain is the swapchain to capture timestamps on.
  • pSetLatencyMarkerInfo is a pointer to a VkSetLatencyMarkerInfoNV structure specifying the parameters of the marker to set.

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.

Valid Usage (Implicit)

VUID-vkSetLatencyMarkerNV-pLatencyMarkerInfo-parameter

pLatencyMarkerInfo must be a valid pointer to a valid VkSetLatencyMarkerInfoNV structure

VUID-vkSetLatencyMarkerNV-swapchain-parent

swapchain must have been created, allocated, or retrieved from device