Modulevulkan-3.27GHC2021
Vulkan.Extensions.VK_EXT_calibrated_timestamps
Name
VK_EXT_calibrated_timestamps - device extension
VK_EXT_calibrated_timestamps
- Name String
VK_EXT_calibrated_timestamps
- Extension Type
Device extension
- Registered Extension Number
185
- Revision
2
- Ratification Status
Not ratified
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2
or
- Deprecation State
Promoted to VK_KHR_calibrated_timestamps extension
- Contact
- Extension Proposal
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
Description
This extension provides an interface to query calibrated timestamps obtained quasi simultaneously from two time domains.
Promotion to VK_KHR_calibrated_timestamps
All functionality in this extension is included in
VK_KHR_calibrated_timestamps, with the suffix changed to KHR. The
original enum names are still available as aliases of the KHR
functionality.
New Commands
New Structures
New Enums
New Enum Constants
Extending StructureType:
Extending TimeDomainKHR:
Version History
Revision 2, 2021-03-16 (Lionel Landwerlin)
Specify requirement on device timestamps
Revision 1, 2018-10-04 (Daniel Rakos)
Internal revisions.
See Also
No cross-references are available
Document Notes
For more information, see the Vulkan Specification.
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
- 6 types
- 4 values
- Packagevulkan-3.27
- Exports23
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceVK_EXT_calibrated_timestamps.hs
VkCalibratedTimestampInfoKHR - Structure specifying the input parameters of a calibrated timestamp query
Valid Usage
timeDomainmust be one of the TimeDomainKHR values returned by getPhysicalDeviceCalibrateableTimeDomainsKHR
If
timeDomainis TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT or TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT, thepNextchain must include a SwapchainCalibratedTimestampInfoEXT structure
Valid Usage (Implicit)
sTypemust be STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR
pNextmust beNULLor a pointer to a valid instance of SwapchainCalibratedTimestampInfoEXTThe
sTypevalue of each structure in thepNextchain must be uniquetimeDomainmust be a valid TimeDomainKHR value
See Also
VK_EXT_calibrated_timestamps, VK_KHR_calibrated_timestamps, StructureType, TimeDomainKHR, getCalibratedTimestampsKHR, getCalibratedTimestampsKHR
Constructors
CalibratedTimestampInfoKHRnext :: Chain espNextisNULLor a pointer to a structure extending this structure.timeDomain :: TimeDomainKHRtimeDomainis a TimeDomainKHR value specifying the time domain from which the calibrated timestamp value should be returned.
Instances5Extensible, Show, FromCStruct, ToCStruct, Zero
Extensible CalibratedTimestampInfoKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_calibrated_timestampsShow (Chain es) => Show (CalibratedTimestampInfoKHR es)Defined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_calibrated_timestamps(Extendss CalibratedTimestampInfoKHR es, PeekChain es) => FromCStruct (CalibratedTimestampInfoKHR es)Defined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_calibrated_timestamps(Extendss CalibratedTimestampInfoKHR es, PokeChain es) => ToCStruct (CalibratedTimestampInfoKHR es)Defined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_calibrated_timestampses ~ '[] => Zero (CalibratedTimestampInfoKHR es)Defined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_calibrated_timestamps
getPhysicalDeviceCalibrateableTimeDomainsKHR :: MonadIO io=> PhysicalDevicephysicalDeviceis the physical device from which to query the set of calibrateable time domains.-> io (Result,"timeDomains"
::: Vector TimeDomainKHR)
vkGetPhysicalDeviceCalibrateableTimeDomainsKHR - Query calibrateable time domains
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 application 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)
physicalDevicemust be a valid PhysicalDevice handle
pTimeDomainCountmust be a valid pointer to auint32_tvalueIf the value referenced by
pTimeDomainCountis not0, andpTimeDomainsis notNULL,pTimeDomainsmust be a valid pointer to an array ofpTimeDomainCountTimeDomainKHR values
Return Codes
See Also
VK_EXT_calibrated_timestamps, VK_KHR_calibrated_timestamps, PhysicalDevice, TimeDomainKHR
getCalibratedTimestampsKHR :: MonadIO io=> Devicedeviceis the logical device used to perform the query.->"timestampInfos"
::: Vector (SomeStruct CalibratedTimestampInfoKHR)pTimestampInfosis a pointer to an array oftimestampCountCalibratedTimestampInfoKHR structures, describing the time domains the calibrated timestamps should be captured from.-> io ("timestamps"
::: Vector Word64,"maxDeviation"
::: Word64)
vkGetCalibratedTimestampsKHR - Query calibrated timestamps
Description
The maximum deviation may vary between calls to getCalibratedTimestampsKHR 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
The
timeDomainvalue of each CalibratedTimestampInfoKHR inpTimestampInfosmust be unique except for those with a value of TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT
Valid Usage (Implicit)
devicemust be a valid Device handle
pTimestampInfosmust be a valid pointer to an array oftimestampCountvalid CalibratedTimestampInfoKHR structurespTimestampsmust be a valid pointer to an array oftimestampCountuint64_tvaluespMaxDeviationmust be a valid pointer to auint64_tvaluetimestampCountmust be greater than0
Return Codes
See Also
VK_EXT_calibrated_timestamps, VK_KHR_calibrated_timestamps, CalibratedTimestampInfoKHR, Device
VkTimeDomainKHR - Supported time domains
Description
TIME_DOMAIN_DEVICE_KHR 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_PRESENT_STAGE_LOCAL_EXT specifies 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.
TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT specifies 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.
TIME_DOMAIN_CLOCK_MONOTONIC_KHR 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:
An implementation supporting VK_KHR_calibrated_timestamps or
VK_EXT_calibrated_timestamps will use the same time domain for all its
Queue so that timestamp values reported for
TIME_DOMAIN_DEVICE_KHR 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_KHR 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_KHR 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, VK_KHR_calibrated_timestamps, CalibratedTimestampInfoKHR, PastPresentationTimingEXT, SwapchainTimeDomainPropertiesEXT, getPhysicalDeviceCalibrateableTimeDomainsKHR, getPhysicalDeviceCalibrateableTimeDomainsKHR
Constructors
Instances6Eq, Ord, Read, Show, Storable, Zero
Eq TimeDomainKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_EXT_present_timingOrd TimeDomainKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_EXT_present_timingRead TimeDomainKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_EXT_present_timingShow TimeDomainKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_EXT_present_timingStorable TimeDomainKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_EXT_present_timingZero TimeDomainKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_EXT_present_timing