# vkSetLatencyMarkerNV(3) Manual Page

## Name

vkSetLatencyMarkerNV - Pass in marker for timing info

Loading… please wait.

## 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 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.

## 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.

Valid Usage (Implicit)

- VUID-vkSetLatencyMarkerNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetLatencyMarkerNV-swapchain-parameter
  `swapchain` must be a valid VkSwapchainKHR handle

- 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`

## See Also

VK_NV_low_latency2, VkDevice, VkSetLatencyMarkerInfoNV, VkSwapchainKHR

## 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.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0