| Safe Haskell | None |
|---|---|
| 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
- 2
- 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 2, 2023-11-15 (Charles Hansen)
- Update vkGetLatencyTimingsNV. This is a breaking API change which brings behavior in line with other array querying commands. More background can be found in https://github.com/KhronosGroup/Vulkan-Docs/issues/2269
Revision 1, 2023-09-25 (Charles Hansen)
- 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.
Synopsis
- setLatencySleepModeNV :: MonadIO io => Device -> SwapchainKHR -> LatencySleepModeInfoNV -> io ()
- latencySleepNV :: MonadIO io => Device -> SwapchainKHR -> LatencySleepInfoNV -> io ()
- setLatencyMarkerNV :: MonadIO io => Device -> SwapchainKHR -> SetLatencyMarkerInfoNV -> io ()
- getLatencyTimingsNV :: MonadIO io => Device -> SwapchainKHR -> io GetLatencyMarkerInfoNV
- queueNotifyOutOfBandNV :: 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 = 2
- pattern NV_LOW_LATENCY_2_SPEC_VERSION :: Integral a => a
- type NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2"
- pattern NV_LOW_LATENCY_2_EXTENSION_NAME :: (Eq a, IsString a) => a
- newtype SwapchainKHR = SwapchainKHR Word64
- newtype PresentModeKHR where
- PresentModeKHR Int32
- pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR
- pattern PRESENT_MODE_FIFO_LATEST_READY_KHR :: PresentModeKHR
- pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR
- pattern PRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR
- pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR
- pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR
- pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR
Documentation
setLatencySleepModeNV Source #
Arguments
| :: 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.
As an exception to the normal rules for objects which are externally
synchronized, the swapchain passed to setLatencySleepModeNV may be
simultaneously used by other threads in calls to functions other than
destroySwapchainKHR. Access to the
swapchain data associated with this extension must be atomic within
the implementation.
Return Codes
See Also
VK_NV_low_latency2,
Device, LatencySleepModeInfoNV,
SwapchainKHR
Arguments
| :: 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. Applications should
call this function before input sampling, and exactly once between
presents.
Return Codes
See Also
VK_NV_low_latency2,
Device, LatencySleepInfoNV,
SwapchainKHR
Arguments
| :: 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. As an
exception to the normal rules for objects which are externally
synchronized, the swapchain passed to setLatencyMarkerNV may be
simultaneously used by other threads in calls to functions other than
destroySwapchainKHR. Access to the
swapchain data associated with this extension must be atomic within
the implementation.
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
Device, SetLatencyMarkerInfoNV,
SwapchainKHR
Arguments
| :: MonadIO io | |
| => Device |
|
| -> SwapchainKHR |
|
| -> io 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.
Valid Usage (Implicit)
See Also
VK_NV_low_latency2,
Device, GetLatencyMarkerInfoNV,
SwapchainKHR
queueNotifyOutOfBandNV Source #
Arguments
| :: 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 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
If pTimings is NULL then the maximum number of queryable frame data
is returned in timingCount. Otherwise, timingCount must be set by
the application to the number of elements in the pTimings array, and
on return is overwritten with the number of values actually written to
pTimings. The elements of pTimings are arranged in the order they
were requested in, with the oldest data in the first entry.
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV
- If
timingCountis not0, andpTimingsis notNULL,pTimingsmust be a valid pointer to an array oftimingCountLatencyTimingsFrameReportNVstructures
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. To associate
a submission with presentID for low latency mode, the pNext chain of
queueSubmit must include a
LatencySubmissionPresentIdNV structure.
Valid Usage (Implicit)
See Also
Constructors
| LatencySubmissionPresentIdNV | |
Fields
| |
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 application to the
number of elements in the pPresentModes array, and on return 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:
LATENCY_MARKER_SIMULATION_START_NVshould be called at the start of the simulation execution each frame, but after the call tolatencySleepNV.LATENCY_MARKER_SIMULATION_END_NVshould be called at the end of the simulation execution each frame.LATENCY_MARKER_RENDERSUBMIT_START_NVshould be called at the beginning of the render submission execution each frame. This should be wherever Vulkan API calls are made and must not span into asynchronous rendering.LATENCY_MARKER_RENDERSUBMIT_END_NVshould be called at the end of the render submission execution each frame.LATENCY_MARKER_PRESENT_START_NVshould be called just beforequeuePresentKHR.LATENCY_MARKER_PRESENT_END_NVshould be called whenqueuePresentKHRreturns.LATENCY_MARKER_INPUT_SAMPLE_NVshould be called just before the application gathers input data.LATENCY_MARKER_TRIGGER_FLASH_NVshould be called anywhere betweenLATENCY_MARKER_SIMULATION_START_NVandLATENCY_MARKER_SIMULATION_END_NVwhenever a left mouse click occurs.
See Also
Constructors
| LatencyMarkerNV Int32 |
Bundled Patterns
| 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 |
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:
OUT_OF_BAND_QUEUE_TYPE_RENDER_NVspecifies that work will be submitted to this queue.OUT_OF_BAND_QUEUE_TYPE_PRESENT_NVspecifies that this queue will be presented from.
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 = 2 Source #
pattern NV_LOW_LATENCY_2_SPEC_VERSION :: Integral a => a Source #
type NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2" Source #
pattern NV_LOW_LATENCY_2_EXTENSION_NAME :: (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.
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
releaseSwapchainImagesKHR,
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.
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_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_KHR_swapchain,
AcquireNextImageInfoKHR,
BindImageMemorySwapchainInfoKHR,
ImageSwapchainCreateInfoKHR,
PastPresentationTimingInfoEXT,
PresentInfoKHR,
ReleaseSwapchainImagesInfoKHR,
SwapchainCalibratedTimestampInfoEXT,
SwapchainCreateInfoKHR,
acquireFullScreenExclusiveModeEXT,
acquireNextImageKHR,
createSharedSwapchainsKHR,
createSwapchainKHR,
destroySwapchainKHR,
getLatencyTimingsNV,
getPastPresentationTimingGOOGLE,
getRefreshCycleDurationGOOGLE,
getSwapchainCounterEXT,
getSwapchainImagesKHR,
getSwapchainStatusKHR,
getSwapchainTimeDomainPropertiesEXT,
getSwapchainTimingPropertiesEXT,
latencySleepNV,
queuePresentKHR,
releaseFullScreenExclusiveModeEXT,
setHdrMetadataEXT,
setLatencyMarkerNV,
setLatencySleepModeNV,
setLocalDimmingAMD,
setSwapchainPresentTimingQueueSizeEXT,
waitForPresent2KHR,
waitForPresentKHR
Constructors
| SwapchainKHR Word64 |
Instances
newtype PresentModeKHR Source #
VkPresentModeKHR - Presentation mode supported for a surface
Description
PRESENT_MODE_IMMEDIATE_KHRspecifies that the presentation engine does not wait for a vertical blanking period to update the current image, meaning this mode may result in visible tearing. No internal queuing of presentation requests is needed, as the requests are applied immediately.
PRESENT_MODE_MAILBOX_KHRspecifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal single-entry queue is used to hold pending presentation requests. If the queue is full when a new presentation request is received, the new request replaces the existing entry, and any images associated with the prior entry become available for reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.PRESENT_MODE_FIFO_KHRspecifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during each vertical blanking period in which the queue is non-empty. This is the only value ofpresentModethat is required to be supported.PRESENT_MODE_FIFO_RELAXED_KHRspecifies that the presentation engine generally waits for the next vertical blanking period to update the current image. If a vertical blanking period has already passed since the last update of the current image then the presentation engine does not wait for another vertical blanking period for the update, meaning this mode may result in visible tearing in this case. This mode is useful for reducing visual stutter with an application that will mostly present a new image before the next vertical blanking period, but may occasionally be late, and present a new image just after the next vertical blanking period. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during or after each vertical blanking period in which the queue is non-empty.PRESENT_MODE_FIFO_LATEST_READY_KHRspecifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue. At each vertical blanking period, the presentation engine dequeues all successive requests that are ready to be presented from the beginning of the queue. If using theVK_GOOGLE_display_timingextension or the presentAtAbsoluteTime feature to provide a target present time, the presentation engine checks the specified time for each image. If the target present time is less-than or equal-to the current time, the presentation engine dequeues the image and checks the next one. The image of the last dequeued request is presented. The other dequeued requests are dropped.PRESENT_MODE_SHARED_DEMAND_REFRESH_KHRspecifies that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine is only required to update the current image after a new presentation request is received. Therefore the application must make a presentation request whenever an update is required. However, the presentation engine may update the current image at any point, meaning this mode may result in visible tearing.PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRspecifies that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine periodically updates the current image on its regular refresh cycle. The application is only required to make one initial presentation request, after which the presentation engine must update the current image without any need for further presentation requests. The application can indicate the image contents have been updated by making a presentation request, but this does not guarantee the timing of when it will be updated. This mode may result in visible tearing if rendering to the image is not timed correctly.
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_FIFO_LATEST_READY_KHR | SurfaceCapabilitiesKHR::supportedUsageFlags |
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR | SharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags |
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR | SharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags |
Presentable Image Usage Queries
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,
SurfacePresentModeCompatibilityKHR,
SurfacePresentModeKHR,
SwapchainCreateInfoKHR,
SwapchainPresentModeInfoKHR,
SwapchainPresentModesCreateInfoKHR,
getPhysicalDeviceSurfacePresentModes2EXT,
getPhysicalDeviceSurfacePresentModesKHR
Constructors
| PresentModeKHR Int32 |
Bundled Patterns
| pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR | |
| pattern PRESENT_MODE_FIFO_LATEST_READY_KHR :: PresentModeKHR | |
| pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR | |
| pattern PRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR | |
| pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR | |
| pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR | |
| pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR |