vulkan-3.6: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_calibrated_timestamps

Synopsis

Documentation

getPhysicalDeviceCalibrateableTimeDomainsEXT Source #

Arguments

:: forall io. MonadIO io 
=> PhysicalDevice

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

-> io (Result, "timeDomains" ::: Vector TimeDomainEXT) 

vkGetPhysicalDeviceCalibrateableTimeDomainsEXT - 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 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. If pTimeDomainCount is smaller than the number of calibrateable time domains supported for the given physicalDevice, INCOMPLETE will be returned instead of SUCCESS to indicate that not all the available values were returned.

Valid Usage (Implicit)

  • 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 TimeDomainEXT values

Return Codes

Success
Failure

See Also

PhysicalDevice, TimeDomainEXT

getCalibratedTimestampsEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device used to perform the query.

device must be a valid Device handle

-> ("timestampInfos" ::: Vector CalibratedTimestampInfoEXT)

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

pTimestampInfos must be a valid pointer to an array of timestampCount valid CalibratedTimestampInfoEXT structures

-> io ("timestamps" ::: Vector Word64, "maxDeviation" ::: Word64) 

vkGetCalibratedTimestampsEXT - Query calibrated timestamps

Description

Note

The maximum deviation may vary between calls to getCalibratedTimestampsEXT 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 devation 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.

Return Codes

Success
Failure

See Also

CalibratedTimestampInfoEXT, Device

data CalibratedTimestampInfoEXT Source #

VkCalibratedTimestampInfoEXT - Structure specifying the input parameters of a calibrated timestamp query

Valid Usage (Implicit)

See Also

StructureType, TimeDomainEXT, getCalibratedTimestampsEXT

Constructors

CalibratedTimestampInfoEXT 

Fields

Instances

Instances details
Eq CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Show CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Generic CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Associated Types

type Rep CalibratedTimestampInfoEXT :: Type -> Type #

Storable CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

FromCStruct CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

ToCStruct CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Zero CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

type Rep CalibratedTimestampInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

type Rep CalibratedTimestampInfoEXT = D1 ('MetaData "CalibratedTimestampInfoEXT" "Vulkan.Extensions.VK_EXT_calibrated_timestamps" "vulkan-3.6-inplace" 'False) (C1 ('MetaCons "CalibratedTimestampInfoEXT" 'PrefixI 'True) (S1 ('MetaSel ('Just "timeDomain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TimeDomainEXT)))

newtype TimeDomainEXT Source #

VkTimeDomainEXT - Supported time domains

Description

struct timespec tv;
clock_gettime(CLOCK_MONOTONIC, &tv);
return tv.tv_nsec + tv.tv_sec*1000000000ull;
struct timespec tv;
clock_gettime(CLOCK_MONOTONIC_RAW, &tv);
return tv.tv_nsec + tv.tv_sec*1000000000ull;
LARGE_INTEGER counter;
QueryPerformanceCounter(&counter);
return counter.QuadPart;

See Also

CalibratedTimestampInfoEXT, getPhysicalDeviceCalibrateableTimeDomainsEXT

Constructors

TimeDomainEXT Int32 

Bundled Patterns

pattern TIME_DOMAIN_DEVICE_EXT :: TimeDomainEXT

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

pattern TIME_DOMAIN_CLOCK_MONOTONIC_EXT :: TimeDomainEXT

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:

pattern TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT :: TimeDomainEXT

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:

pattern TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT :: TimeDomainEXT

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:

Instances

Instances details
Eq TimeDomainEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Ord TimeDomainEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Read TimeDomainEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Show TimeDomainEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Storable TimeDomainEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

Zero TimeDomainEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_calibrated_timestamps

type EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_EXT_calibrated_timestamps" Source #