C Specification

In order to be able to correlate the time a particular operation took place at on timelines of different time domains (e.g. a device operation vs. a host operation), Vulkan allows querying calibrated timestamps from multiple time domains.

To query calibrated timestamps from a set of time domains, call:

// Provided by VK_EXT_calibrated_timestamps
VkResult vkGetCalibratedTimestampsEXT(
    VkDevice                                    device,
    uint32_t                                    timestampCount,
    const VkCalibratedTimestampInfoEXT*         pTimestampInfos,
    uint64_t*                                   pTimestamps,
    uint64_t*                                   pMaxDeviation);


  • device is the logical device used to perform the query.

  • timestampCount is the number of timestamps to query.

  • pTimestampInfos is a pointer to an array of timestampCount VkCalibratedTimestampInfoEXT structures, describing the time domains the calibrated timestamps should be captured from.

  • pTimestamps is a pointer to an array of timestampCount 64-bit unsigned integer values in which the requested calibrated timestamp values are returned.

  • pMaxDeviation is a pointer to a 64-bit unsigned integer value in which the strictly positive maximum deviation, in nanoseconds, of the calibrated timestamp values is returned.



The maximum deviation may vary between calls to vkGetCalibratedTimestampsEXT even for the same set of time domains due to implementation and platform specific reasons. It is the application’s responsibility to assess whether the returned maximum deviation makes the timestamp values suitable for any particular purpose and can choose to re-issue the timestamp calibration call pursuing a lower deviation value.

Calibrated timestamp values can be extrapolated to estimate future coinciding timestamp values, however, depending on the nature of the time domains and other properties of the platform extrapolating values over a sufficiently long period of time may no longer be accurate enough to fit any particular purpose, so applications are expected to re-calibrate the timestamps on a regular basis.

Valid Usage
  • VUID-vkGetCalibratedTimestampsEXT-timeDomain-09246
    The timeDomain value of each VkCalibratedTimestampInfoEXT in pTimestampInfos must be unique

If VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations is VK_TRUE, vkGetCalibratedTimestampsEXT must not return VK_ERROR_OUT_OF_HOST_MEMORY.

Valid Usage (Implicit)
  • VUID-vkGetCalibratedTimestampsEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetCalibratedTimestampsEXT-pTimestampInfos-parameter
    pTimestampInfos must be a valid pointer to an array of timestampCount valid VkCalibratedTimestampInfoEXT structures

  • VUID-vkGetCalibratedTimestampsEXT-pTimestamps-parameter
    pTimestamps must be a valid pointer to an array of timestampCount uint64_t values

  • VUID-vkGetCalibratedTimestampsEXT-pMaxDeviation-parameter
    pMaxDeviation must be a valid pointer to a uint64_t value

  • VUID-vkGetCalibratedTimestampsEXT-timestampCount-arraylength
    timestampCount must be greater than 0

Return Codes
On success, this command returns

On failure, this command returns


See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0