VkTimeDomainEXT(3)

# VkTimeDomainEXT(3) Manual Page

## Name

VkTimeDomainEXT - Supported time domains

Loading… please wait.

## C Specification

The set of supported time domains consists of:

    // Provided by VK_EXT_calibrated_timestamps
    typedef enum VkTimeDomainEXT {
        VK_TIME_DOMAIN_DEVICE_EXT = 0,
        VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1,
        VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2,
        VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3,
    } VkTimeDomainEXT;

## Description

- `VK_TIME_DOMAIN_DEVICE_EXT` specifies the device time domain. Timestamp values in this time domain use the same units and are comparable with device timestamp values captured using vkCmdWriteTimestamp or vkCmdWriteTimestamp2 and are defined to be incrementing according to the `timestampPeriod` of the device.

- `VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT` specifies the CLOCK_MONOTONIC time domain available on POSIX platforms. Timestamp values in this time domain are in units of nanoseconds and are comparable with platform timestamp values captured using the POSIX clock_gettime API as computed by this example:

| Note An implementation supporting `VK_EXT_calibrated_timestamps` will use the same time domain for all its VkQueue so that timestamp values reported for `VK_TIME_DOMAIN_DEVICE_EXT` can be matched to any timestamp captured through vkCmdWriteTimestamp or vkCmdWriteTimestamp2 .

    struct timespec tv;
    clock_gettime(CLOCK_MONOTONIC, &tv);
    return tv.tv_nsec + tv.tv_sec*1000000000ull;

- `VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT` specifies the CLOCK_MONOTONIC_RAW time domain available on POSIX platforms. Timestamp values in this time domain are in units of nanoseconds and are comparable with platform timestamp values captured using the POSIX clock_gettime API as computed by this example:

    struct timespec tv;
    clock_gettime(CLOCK_MONOTONIC_RAW, &tv);
    return tv.tv_nsec + tv.tv_sec*1000000000ull;

- `VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT` specifies the performance counter (QPC) time domain available on Windows. Timestamp values in this time domain are in the same units as those provided by the Windows QueryPerformanceCounter API and are comparable with platform timestamp values captured using that API as computed by this example:

    LARGE_INTEGER counter;
    QueryPerformanceCounter(&counter);
    return counter.QuadPart;

## See Also

VK_EXT_calibrated_timestamps, VkCalibratedTimestampInfoEXT, vkGetPhysicalDeviceCalibrateableTimeDomainsEXT

## 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-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0