Enum
VkTimeDomainKHR
Supported time domains
The set of supported time domains consists of:
typedef enum VkTimeDomainKHR {
VK_TIME_DOMAIN_DEVICE_KHR = 0,
VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR = 1,
VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = 2,
VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = 3,
// Provided by extensions
VK_TIME_DOMAIN_DEVICE_EXT = VK_TIME_DOMAIN_DEVICE_KHR,
VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR,
VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR,
VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR,
VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT = -999999000,
VK_TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT = -999999001,
} VkTimeDomainKHR;
pub struct TimeDomainKHR(u32);
impl TimeDomainKHR {
pub const DEVICE: Self = 0;
pub const CLOCK_MONOTONIC: Self = 1;
pub const CLOCK_MONOTONIC_RAW: Self = 2;
pub const QUERY_PERFORMANCE_COUNTER: Self = 3;
pub const DEVICE_EXT: Self = Self::DEVICE;
pub const CLOCK_MONOTONIC_EXT: Self = Self::CLOCK_MONOTONIC;
pub const CLOCK_MONOTONIC_RAW_EXT: Self = Self::CLOCK_MONOTONIC_RAW;
pub const QUERY_PERFORMANCE_COUNTER_EXT: Self = Self::QUERY_PERFORMANCE_COUNTER;
pub const PRESENT_STAGE_LOCAL_EXT: Self = -999999000;
pub const SWAPCHAIN_LOCAL_EXT: Self = -999999001;
}
#define VkTimeDomainEXT VkTimeDomainKHR
const TimeDomainEXT: _ = vk::TimeDomainKHR;
VK_TIME_DOMAIN_DEVICE_KHRspecifies 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 thetimestampPeriodof the device.VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXTspecifies a time domain unique to a particular swapchain and a specific present stage. Timestamp values in this time domain are in units of nanosecond and are comparable only with other values from the same swapchain and present stage.VK_TIME_DOMAIN_SWAPCHAIN_LOCAL_EXTspecifies a time domain unique to a particular swapchain. Timestamp values in this time domain are in units of nanosecond and are comparable only with other values from the same swapchain.VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHRspecifies 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:
An implementation supporting
VK_KHR_calibrated_timestamps
or
VK_EXT_calibrated_timestamps
will use the same time domain for all its VkQueue so that timestamp
values reported for
VK_TIME_DOMAIN_DEVICE_KHR 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_KHRspecifies 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_KHRspecifies 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;
Type
Enum