| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_NV_low_latency2
Description
Name
VK_NV_low_latency2 - device extension
VK_NV_low_latency2
- Name String
VK_NV_low_latency2
- Extension Type
- Device extension
- Registered Extension Number
- 506
- Revision
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies; Contact
Other Extension Metadata
- Last Modified Date
- 2023-09-25
- Contributors
- Charles Hansen, NVIDIA
- Liam Middlebrook, NVIDIA
- Lionel Duc, NVIDIA
- James Jones, NVIDIA
- Eric Sullivan, NVIDIA
New Commands
New Structures
LatencySleepInfoNVLatencySleepModeInfoNVLatencyTimingsFrameReportNVOutOfBandQueueTypeInfoNVSetLatencyMarkerInfoNVExtending
SubmitInfo,SubmitInfo2:Extending
SurfaceCapabilities2KHR:Extending
SwapchainCreateInfoKHR:
New Enums
New Enum Constants
NV_LOW_LATENCY_2_SPEC_VERSIONExtending
StructureType:STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NVSTRUCTURE_TYPE_LATENCY_SLEEP_INFO_NVSTRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NVSTRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NVSTRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NVSTRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NVSTRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NVSTRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NVSTRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV
Description
This extension gives applications timing suggestions on when to start
the recording of new frames to reduce the latency between input sampling
and frame presentation. Applications can accomplish this through the
extension by calling setLatencySleepModeNV to allow the driver to pace
a given swapchain, then calling latencySleepNV before input sampling
to delay the start of the CPU side work. Additional methods and
structures are provided to give insight into the latency pipeline of an
application through the latency markers. VK_NV_low_latency provides
legacy support for applications that make use of the NVIDIA Reflex SDK
whereas new implementations should use the VK_NV_low_latency2
extension.
Issues
1) How does Low Latency 2 work with applications that utilize device groups?
Low Latency 2 does not support device groups.
Version History
Revision 1, 2023-09-25 (Charles Hansen)
- Internal revisions
See Also
GetLatencyMarkerInfoNV, LatencyMarkerNV, LatencySleepInfoNV,
LatencySleepModeInfoNV, LatencySubmissionPresentIdNV,
LatencySurfaceCapabilitiesNV, LatencyTimingsFrameReportNV,
OutOfBandQueueTypeInfoNV, OutOfBandQueueTypeNV,
SetLatencyMarkerInfoNV, SwapchainLatencyCreateInfoNV,
getLatencyTimingsNV, latencySleepNV, queueNotifyOutOfBandNV,
setLatencyMarkerNV, setLatencySleepModeNV
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.
Synopsis
- setLatencySleepModeNV :: forall io. MonadIO io => Device -> SwapchainKHR -> LatencySleepModeInfoNV -> io ()
- latencySleepNV :: forall io. MonadIO io => Device -> SwapchainKHR -> LatencySleepInfoNV -> io ()
- setLatencyMarkerNV :: forall io. MonadIO io => Device -> SwapchainKHR -> SetLatencyMarkerInfoNV -> io ()
- getLatencyTimingsNV :: forall io. MonadIO io => Device -> SwapchainKHR -> io ("timingCount" ::: Word32, GetLatencyMarkerInfoNV)
- queueNotifyOutOfBandNV :: forall io. MonadIO io => Queue -> OutOfBandQueueTypeInfoNV -> io ()
- data LatencySleepModeInfoNV = LatencySleepModeInfoNV {}
- data LatencySleepInfoNV = LatencySleepInfoNV {}
- data SetLatencyMarkerInfoNV = SetLatencyMarkerInfoNV {}
- data GetLatencyMarkerInfoNV = GetLatencyMarkerInfoNV {}
- data LatencyTimingsFrameReportNV = LatencyTimingsFrameReportNV {
- presentID :: Word64
- inputSampleTimeUs :: Word64
- simStartTimeUs :: Word64
- simEndTimeUs :: Word64
- renderSubmitStartTimeUs :: Word64
- renderSubmitEndTimeUs :: Word64
- presentStartTimeUs :: Word64
- presentEndTimeUs :: Word64
- driverStartTimeUs :: Word64
- driverEndTimeUs :: Word64
- osRenderQueueStartTimeUs :: Word64
- osRenderQueueEndTimeUs :: Word64
- gpuRenderStartTimeUs :: Word64
- gpuRenderEndTimeUs :: Word64
- data OutOfBandQueueTypeInfoNV = OutOfBandQueueTypeInfoNV {}
- data LatencySubmissionPresentIdNV = LatencySubmissionPresentIdNV {}
- data SwapchainLatencyCreateInfoNV = SwapchainLatencyCreateInfoNV {}
- data LatencySurfaceCapabilitiesNV = LatencySurfaceCapabilitiesNV {}
- newtype LatencyMarkerNV where
- LatencyMarkerNV Int32
- pattern LATENCY_MARKER_SIMULATION_START_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_SIMULATION_END_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_RENDERSUBMIT_START_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_RENDERSUBMIT_END_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_PRESENT_START_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_PRESENT_END_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_INPUT_SAMPLE_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_TRIGGER_FLASH_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV :: LatencyMarkerNV
- pattern LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV :: LatencyMarkerNV
- newtype OutOfBandQueueTypeNV where
- type NV_LOW_LATENCY_2_SPEC_VERSION = 1
- pattern NV_LOW_LATENCY_2_SPEC_VERSION :: forall a. Integral a => a
- type NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2"
- pattern NV_LOW_LATENCY_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype SwapchainKHR = SwapchainKHR Word64
- newtype PresentModeKHR where
- PresentModeKHR Int32
- pattern PRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR
- pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR
- pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR
- pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR
- pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR
- pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR
Documentation
setLatencySleepModeNV Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> SwapchainKHR |
|
| -> LatencySleepModeInfoNV |
|
| -> io () |
vkSetLatencySleepModeNV - Enable or Disable low latency mode on a swapchain
Description
If pSleepModeInfo is NULL, setLatencySleepModeNV will disable low
latency mode, low latency boost, and set the minimum present interval
previously specified by LatencySleepModeInfoNV to zero on swapchain.
Return Codes
See Also
VK_NV_low_latency2,
Device, LatencySleepModeInfoNV,
SwapchainKHR
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> SwapchainKHR |
|
| -> LatencySleepInfoNV |
|
| -> io () |
vkLatencySleepNV - Trigger low latency mode Sleep
Description
latencySleepNV returns immediately. Applications should use
waitSemaphores
with
pSleepInfo::signalSemaphore
to delay host CPU work. CPU work refers to application work done before
presenting which includes but is not limited to: input sampling,
simulation, command buffer recording, command buffer submission, and
present submission. It is recommended to call this function before input
sampling. When using this function, it should be called exactly once
between presents.
Return Codes
See Also
VK_NV_low_latency2,
Device, LatencySleepInfoNV,
SwapchainKHR
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> SwapchainKHR |
|
| -> SetLatencyMarkerInfoNV |
|
| -> io () |
vkSetLatencyMarkerNV - Pass in marker for timing info
Description
At the beginning and end of simulation and render threads and beginning
and end of queuePresentKHR calls,
setLatencyMarkerNV can be called to provide timestamps for the
application’s reference. These timestamps are returned with a call to
getLatencyTimingsNV alongside driver provided timestamps at various
points of interest with regards to latency within the application.
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
Device, SetLatencyMarkerInfoNV,
SwapchainKHR
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> SwapchainKHR |
|
| -> io ("timingCount" ::: Word32, GetLatencyMarkerInfoNV) |
vkGetLatencyTimingsNV - Get latency marker results
Description
The timings returned by getLatencyTimingsNV contain the timestamps
requested from setLatencyMarkerNV and additional
implementation-specific markers defined in
LatencyTimingsFrameReportNV. If pTimings is NULL, then the maximum
number of queryable frame data is returned in pTimingCount. Otherwise,
pTimingCount must point to a variable set by the user to the number
of elements in the pTimings array in pGetLatencyMarkerInfo, and on
return the variable is overwritten with the number of values actually
written to pTimings.
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
Device, GetLatencyMarkerInfoNV,
SwapchainKHR
queueNotifyOutOfBandNV Source #
Arguments
| :: forall io. MonadIO io | |
| => Queue |
|
| -> OutOfBandQueueTypeInfoNV |
|
| -> io () |
vkQueueNotifyOutOfBandNV - Notify out of band queue
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| - | - | - | Any | - |
See Also
data LatencySleepModeInfoNV Source #
VkLatencySleepModeInfoNV - Structure to set low latency mode
Description
If lowLatencyMode is set to FALSE,
lowLatencyBoost will still hint to the GPU to increase its power state
and latencySleepNV will still enforce minimumIntervalUs between
queuePresentKHR calls.
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
Bool32,
StructureType,
setLatencySleepModeNV
Constructors
| LatencySleepModeInfoNV | |
Fields
| |
Instances
data LatencySleepInfoNV Source #
VkLatencySleepInfoNV - Structure specifying the parameters of vkLatencySleepNV
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
Semaphore,
StructureType, latencySleepNV
Constructors
| LatencySleepInfoNV | |
Fields
| |
Instances
data SetLatencyMarkerInfoNV Source #
VkSetLatencyMarkerInfoNV - Structure specifying the parameters of vkSetLatencyMarkerNV
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
LatencyMarkerNV, StructureType,
setLatencyMarkerNV
Constructors
| SetLatencyMarkerInfoNV | |
Fields
| |
Instances
data GetLatencyMarkerInfoNV Source #
VkGetLatencyMarkerInfoNV - Structure specifying the parameters of vkGetLatencyTimingsNV
Description
The elements of pTimings are arranged in the order they were requested
in, with the oldest data in the first entry.
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
LatencyTimingsFrameReportNV,
StructureType, getLatencyTimingsNV
Constructors
| GetLatencyMarkerInfoNV | |
Fields
| |
Instances
data LatencyTimingsFrameReportNV Source #
VkLatencyTimingsFrameReportNV - Structure containing latency data
Members
The members of the LatencyTimingsFrameReportNV structure describe the
following:
Valid Usage (Implicit)
See Also
Constructors
| LatencyTimingsFrameReportNV | |
Fields
| |
Instances
data OutOfBandQueueTypeInfoNV Source #
VkOutOfBandQueueTypeInfoNV - Structure used to describe the queue that is being marked as Out of Band
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
OutOfBandQueueTypeNV,
StructureType,
queueNotifyOutOfBandNV
Constructors
| OutOfBandQueueTypeInfoNV | |
Fields
| |
Instances
data LatencySubmissionPresentIdNV Source #
VkLatencySubmissionPresentIdNV - Structure used to associate a queueSubmit with a presentId
Description
For any submission to be tracked with low latency mode pacing, it needs
to be associated with other submissions in a given present. Applications
:must include the VkLatencySubmissionPresentIdNV in the pNext chain of
queueSubmit to associate that submission with the
presentId present for low latency mode.
Valid Usage (Implicit)
See Also
Constructors
| LatencySubmissionPresentIdNV | |
Instances
data SwapchainLatencyCreateInfoNV Source #
VkSwapchainLatencyCreateInfoNV - Specify that a swapchain will use low latency mode
Valid Usage (Implicit)
See Also
Constructors
| SwapchainLatencyCreateInfoNV | |
Fields | |
Instances
data LatencySurfaceCapabilitiesNV Source #
VkLatencySurfaceCapabilitiesNV - Structure describing surface optimized presentation modes for use with low latency mode
Description
If pPresentModes is NULL, then the number of present modes that are
optimized for use with low latency mode returned in presentModeCount.
Otherwise, presentModeCount must be set by the user to the number of
elements in the pPresentModes array, and on return the variable is
overwritten with the number of values actually written to
pPresentModes. If the value of presentModeCount is less than the
number of optimized present modes, at most presentModeCount values
will be written to pPresentModes.
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV
- If
presentModeCountis not0, andpPresentModesis notNULL,pPresentModesmust be a valid pointer to an array ofpresentModeCountPresentModeKHRvalues
See Also
Constructors
| LatencySurfaceCapabilitiesNV | |
Fields
| |
Instances
newtype LatencyMarkerNV Source #
VkLatencyMarkerNV - Structure used to mark different points in latency
Description
The members of the LatencyMarkerNV are used as arguments for
setLatencyMarkerNV in the use cases described below:
See Also
Constructors
| LatencyMarkerNV Int32 |
Bundled Patterns
Instances
newtype OutOfBandQueueTypeNV Source #
VkOutOfBandQueueTypeNV - Type of out of band queue
Description
The members of the OutOfBandQueueTypeNV are used to describe the queue
type in OutOfBandQueueTypeInfoNV as described below:
See Also
Constructors
| OutOfBandQueueTypeNV Int32 |
Bundled Patterns
| pattern OUT_OF_BAND_QUEUE_TYPE_RENDER_NV :: OutOfBandQueueTypeNV |
|
| pattern OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV :: OutOfBandQueueTypeNV |
|
Instances
type NV_LOW_LATENCY_2_SPEC_VERSION = 1 Source #
pattern NV_LOW_LATENCY_2_SPEC_VERSION :: forall a. Integral a => a Source #
type NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2" Source #
pattern NV_LOW_LATENCY_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype SwapchainKHR Source #
VkSwapchainKHR - Opaque handle to a swapchain object
Description
A swapchain is an abstraction for an array of presentable images that
are associated with a surface. The presentable images are represented by
Image objects created by the platform. One image
(which can be an array image for multiview/stereoscopic-3D surfaces)
is displayed at a time, but multiple images can be queued for
presentation. An application renders to the image, and then queues the
image for presentation to the surface.
A native window cannot be associated with more than one non-retired swapchain at a time. Further, swapchains cannot be created for native windows that have a non-Vulkan graphics API surface associated with them.
Note
The presentation engine is an abstraction for the platform’s compositor or display engine.
The presentation engine may be synchronous or asynchronous with respect to the application and/or logical device.
Some implementations may use the device’s graphics queue or dedicated presentation hardware to perform presentation.
The presentable images of a swapchain are owned by the presentation
engine. An application can acquire use of a presentable image from the
presentation engine. Use of a presentable image must occur only after
the image is returned by
acquireNextImageKHR, and before it
is released by queuePresentKHR.
This includes transitioning the image layout and rendering commands.
An application can acquire use of a presentable image with
acquireNextImageKHR. After
acquiring a presentable image and before modifying it, the application
must use a synchronization primitive to ensure that the presentation
engine has finished reading from the image. The application can then
transition the image’s layout, queue rendering commands to it, etc.
Finally, the application presents the image with
queuePresentKHR, which releases the
acquisition of the image. The application can also release the
acquisition of the image through
releaseSwapchainImagesEXT,
if the image is not in use by the device, and skip the present
operation.
The presentation engine controls the order in which presentable images are acquired for use by the application.
Note
This allows the platform to handle situations which require out-of-order return of images after presentation. At the same time, it allows the application to generate command buffers referencing all of the images in the swapchain at initialization time, rather than in its main loop.
See Also
VK_KHR_swapchain,
AcquireNextImageInfoKHR,
BindImageMemorySwapchainInfoKHR,
ImageSwapchainCreateInfoKHR,
PresentInfoKHR,
ReleaseSwapchainImagesInfoEXT,
SwapchainCreateInfoKHR,
acquireFullScreenExclusiveModeEXT,
acquireNextImageKHR,
createSharedSwapchainsKHR,
createSwapchainKHR,
destroySwapchainKHR,
getLatencyTimingsNV,
getPastPresentationTimingGOOGLE,
getRefreshCycleDurationGOOGLE,
getSwapchainCounterEXT,
getSwapchainImagesKHR,
getSwapchainStatusKHR,
latencySleepNV,
queuePresentKHR,
releaseFullScreenExclusiveModeEXT,
setHdrMetadataEXT,
setLatencyMarkerNV,
setLatencySleepModeNV,
setLocalDimmingAMD,
waitForPresentKHR
Constructors
| SwapchainKHR Word64 |
Instances
newtype PresentModeKHR Source #
VkPresentModeKHR - Presentation mode supported for a surface
Description
The supported
ImageUsageFlagBits of the
presentable images of a swapchain created for a surface may differ
depending on the presentation mode, and can be determined as per the
table below:
| Presentation mode | Image usage flags |
|---|---|
PRESENT_MODE_IMMEDIATE_KHR | SurfaceCapabilitiesKHR::supportedUsageFlags |
PRESENT_MODE_MAILBOX_KHR | SurfaceCapabilitiesKHR::supportedUsageFlags |
PRESENT_MODE_FIFO_KHR | SurfaceCapabilitiesKHR::supportedUsageFlags |
PRESENT_MODE_FIFO_RELAXED_KHR | SurfaceCapabilitiesKHR::supportedUsageFlags |
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR | SharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags |
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR | SharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags |
Presentable image usage queries
Note
For reference, the mode indicated by PRESENT_MODE_FIFO_KHR is
equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap
interval of 1, while the mode indicated by
PRESENT_MODE_FIFO_RELAXED_KHR is equivalent to the behavior of
{wgl|glX}SwapBuffers with a swap interval of -1 (from the
{WGL|GLX}_EXT_swap_control_tear extensions).
See Also
VK_KHR_surface,
LatencySurfaceCapabilitiesNV,
SurfacePresentModeCompatibilityEXT,
SurfacePresentModeEXT,
SwapchainCreateInfoKHR,
SwapchainPresentModeInfoEXT,
SwapchainPresentModesCreateInfoEXT,
getPhysicalDeviceSurfacePresentModes2EXT,
getPhysicalDeviceSurfacePresentModesKHR
Constructors
| PresentModeKHR Int32 |
Bundled Patterns
| pattern PRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR |
|
| pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR |
|
| pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR |
|
| pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR |
|
| pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR |
|
| pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR |
|