Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTCalibratedTimestamps

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

This extension provides an interface to query calibrated timestamps obtained quasi simultaneously from two time domains.
VK_EXT_calibrated_timestamps
Name String
VK_EXT_calibrated_timestamps
Extension Type
Device extension
Registered Extension Number
185
Revision
2
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Version 1.1
Contact
Extension Proposal
VK_EXT_calibrated_timestamps
Other Extension Metadata
Last Modified Date
2018-10-04
IP Status
No known IP claims.
Contributors
  • Matthaeus G. Chajdas, AMD
  • Alan Harrison, AMD
  • Derrick Owens, AMD
  • Daniel Rakos, AMD
  • Faith Ekstrand, Intel
  • Keith Packard, Valve

Field Summary

Modifier and TypeField and Description
public static final String
public static final int
VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION

The extension specification version.

public static final int
public static final int
VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT

VkTimeDomainEXT - Supported time domains Description

  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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:
public static final int
VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT

VkTimeDomainEXT - Supported time domains Description

  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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:
public static final int
VK_TIME_DOMAIN_DEVICE_EXT

VkTimeDomainEXT - Supported time domains Description

  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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:
public static final int
VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT

VkTimeDomainEXT - Supported time domains Description

  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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:

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nvkGetCalibratedTimestampsEXT(VkDevice device, int
the number of timestamps to query.
timestampCount
,
long pTimestampInfos, long pTimestamps, long pMaxDeviation)

Unsafe version of: GetCalibratedTimestampsEXT

public static int
nvkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, long
a pointer to an integer related to the number of calibrateable time domains available or queried, as described below.
pTimeDomainCount
,
long pTimeDomains)

Unsafe version of: GetPhysicalDeviceCalibrateableTimeDomainsEXT

public static int
vkGetCalibratedTimestampsEXT(VkDevice
the logical device used to perform the query.
device
,
VkCalibratedTimestampInfoEXT.Buffer
a pointer to an array of timestampCount VkCalibratedTimestampInfoEXT structures, describing the time domains the calibrated timestamps should be captured from.
pTimestampInfos
,
LongBuffer
a pointer to an array of timestampCount 64-bit unsigned integer values in which the requested calibrated timestamp values are returned.
pTimestamps
,
LongBuffer
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.
pMaxDeviation
)

Query calibrated timestamps.

public static int
vkGetCalibratedTimestampsEXT(VkDevice device, VkCalibratedTimestampInfoEXT.Buffer pTimestampInfos, long[] pTimestamps, long[] pMaxDeviation)

Array version of: GetCalibratedTimestampsEXT

public static int
vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice
the physical device from which to query the set of calibrateable time domains.
physicalDevice
,
IntBuffer
a pointer to an integer related to the number of calibrateable time domains available or queried, as described below.
pTimeDomainCount
,
IntBuffer
either NULL or a pointer to an array of VkTimeDomainEXT values, indicating the supported calibrateable time domains.
pTimeDomains
)

Query calibrateable time domains.

public static int
vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, int[] pTimeDomainCount, int[] pTimeDomains)

Array version of: GetPhysicalDeviceCalibrateableTimeDomainsEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAMEback to summary
public static final String VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME

The extension name.

VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSIONback to summary
public static final int VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXTback to summary
public static final int VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT

Extends VkStructureType.

VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXTback to summary
public static final int VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT

VkTimeDomainEXT - Supported time domains

Description
  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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 TIME_DOMAIN_DEVICE_EXT can be matched to any timestamp captured through CmdWriteTimestamp or CmdWriteTimestamp2 .


struct timespec tv;
clock_gettime(CLOCK_MONOTONIC, &tv);
return tv.tv_nsec + tv.tv_sec*1000000000ull;
  • 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;
  • 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

VkCalibratedTimestampInfoEXT, GetPhysicalDeviceCalibrateableTimeDomainsEXT

VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXTback to summary
public static final int VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT

VkTimeDomainEXT - Supported time domains

Description
  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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 TIME_DOMAIN_DEVICE_EXT can be matched to any timestamp captured through CmdWriteTimestamp or CmdWriteTimestamp2 .


struct timespec tv;
clock_gettime(CLOCK_MONOTONIC, &tv);
return tv.tv_nsec + tv.tv_sec*1000000000ull;
  • 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;
  • 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

VkCalibratedTimestampInfoEXT, GetPhysicalDeviceCalibrateableTimeDomainsEXT

VK_TIME_DOMAIN_DEVICE_EXTback to summary
public static final int VK_TIME_DOMAIN_DEVICE_EXT

VkTimeDomainEXT - Supported time domains

Description
  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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 TIME_DOMAIN_DEVICE_EXT can be matched to any timestamp captured through CmdWriteTimestamp or CmdWriteTimestamp2 .


struct timespec tv;
clock_gettime(CLOCK_MONOTONIC, &tv);
return tv.tv_nsec + tv.tv_sec*1000000000ull;
  • 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;
  • 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

VkCalibratedTimestampInfoEXT, GetPhysicalDeviceCalibrateableTimeDomainsEXT

VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXTback to summary
public static final int VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT

VkTimeDomainEXT - Supported time domains

Description
  • 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 CmdWriteTimestamp or CmdWriteTimestamp2 and are defined to be incrementing according to the timestampPeriod of the device.
  • 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 TIME_DOMAIN_DEVICE_EXT can be matched to any timestamp captured through CmdWriteTimestamp or CmdWriteTimestamp2 .


struct timespec tv;
clock_gettime(CLOCK_MONOTONIC, &tv);
return tv.tv_nsec + tv.tv_sec*1000000000ull;
  • 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;
  • 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

VkCalibratedTimestampInfoEXT, GetPhysicalDeviceCalibrateableTimeDomainsEXT

Constructor Detail

EXTCalibratedTimestampsback to summary
protected EXTCalibratedTimestamps()

Method Detail

nvkGetCalibratedTimestampsEXTback to summary
public static int nvkGetCalibratedTimestampsEXT(VkDevice device, int timestampCount, long pTimestampInfos, long pTimestamps, long pMaxDeviation)

Unsafe version of: GetCalibratedTimestampsEXT

Parameters
timestampCount:int

the number of timestamps to query.

nvkGetPhysicalDeviceCalibrateableTimeDomainsEXTback to summary
public static int nvkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, long pTimeDomainCount, long pTimeDomains)

Unsafe version of: GetPhysicalDeviceCalibrateableTimeDomainsEXT

Parameters
pTimeDomainCount:long

a pointer to an integer related to the number of calibrateable time domains available or queried, as described below.

vkGetCalibratedTimestampsEXTback to summary
public static int vkGetCalibratedTimestampsEXT(VkDevice device, VkCalibratedTimestampInfoEXT.Buffer pTimestampInfos, LongBuffer pTimestamps, LongBuffer pMaxDeviation)

Query calibrated timestamps.

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:


VkResult vkGetCalibratedTimestampsEXT(
    VkDevice                                    device,
    uint32_t                                    timestampCount,
    const VkCalibratedTimestampInfoEXT*         pTimestampInfos,
    uint64_t*                                   pTimestamps,
    uint64_t*                                   pMaxDeviation);
Description
Note

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 (Implicit)
  • device must be a valid VkDevice handle
  • pTimestampInfos must be a valid pointer to an array of timestampCount valid VkCalibratedTimestampInfoEXT structures
  • pTimestamps must be a valid pointer to an array of timestampCount uint64_t values
  • pMaxDeviation must be a valid pointer to a uint64_t value
  • timestampCount must be greater than 0
Return Codes
On success, this command returns
On failure, this command returns
See Also

VkCalibratedTimestampInfoEXT

Parameters
device:VkDevice

the logical device used to perform the query.

pTimestampInfos:VkCalibratedTimestampInfoEXT.Buffer

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

pTimestamps:LongBuffer

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

pMaxDeviation:LongBuffer

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.

Annotations
@NativeType:VkResult
vkGetCalibratedTimestampsEXTback to summary
public static int vkGetCalibratedTimestampsEXT(VkDevice device, VkCalibratedTimestampInfoEXT.Buffer pTimestampInfos, long[] pTimestamps, long[] pMaxDeviation)

Array version of: GetCalibratedTimestampsEXT

Annotations
@NativeType:VkResult
vkGetPhysicalDeviceCalibrateableTimeDomainsEXTback to summary
public static int vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, IntBuffer pTimeDomainCount, IntBuffer pTimeDomains)

Query calibrateable time domains.

C Specification

To query the set of time domains for which a physical device supports timestamp calibration, call:


VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
    VkPhysicalDevice                            physicalDevice,
    uint32_t*                                   pTimeDomainCount,
    VkTimeDomainEXT*                            pTimeDomains);
Description

If pTimeDomains is NULL, then the number of calibrateable time domains supported for the given physicalDevice is returned in pTimeDomainCount. Otherwise, pTimeDomainCount must point to a variable set by the user to the number of elements in the pTimeDomains array, and on return the variable is overwritten with the number of values actually written to pTimeDomains. If the value of pTimeDomainCount is less than the number of calibrateable time domains supported, at most pTimeDomainCount values will be written to pTimeDomains, and INCOMPLETE will be returned instead of SUCCESS, to indicate that not all the available time domains were returned.

Valid Usage (Implicit)
  • physicalDevice must be a valid VkPhysicalDevice handle
  • pTimeDomainCount must be a valid pointer to a uint32_t value
  • If the value referenced by pTimeDomainCount is not 0, and pTimeDomains is not NULL, pTimeDomains must be a valid pointer to an array of pTimeDomainCount VkTimeDomainEXT values
Return Codes
On success, this command returns
On failure, this command returns
Parameters
physicalDevice:VkPhysicalDevice

the physical device from which to query the set of calibrateable time domains.

pTimeDomainCount:IntBuffer

a pointer to an integer related to the number of calibrateable time domains available or queried, as described below.

pTimeDomains:IntBuffer

either NULL or a pointer to an array of VkTimeDomainEXT values, indicating the supported calibrateable time domains.

Annotations
@NativeType:VkResult
vkGetPhysicalDeviceCalibrateableTimeDomainsEXTback to summary
public static int vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, int[] pTimeDomainCount, int[] pTimeDomains)

Array version of: GetPhysicalDeviceCalibrateableTimeDomainsEXT

Annotations
@NativeType:VkResult