vulkan
Safe HaskellNone
LanguageHaskell2010

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

Vulkan Version 1.2      or

VK_KHR_timeline_semaphore and

VK_KHR_present_id      or

VK_KHR_present_id2

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

New Enums

New Enum Constants

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

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

Documentation

setLatencySleepModeNV Source #

Arguments

:: MonadIO io 
=> Device

device is the device associated with swapchain.

device must be a valid Device handle

-> SwapchainKHR

swapchain is the swapchain to enable or disable low latency mode on.

swapchain must be a valid SwapchainKHR handle

swapchain must have been created, allocated, or retrieved from device

-> LatencySleepModeInfoNV

pSleepModeInfo is NULL or a pointer to a LatencySleepModeInfoNV structure specifying the parameters of the latency sleep mode.

pSleepModeInfo must be a valid pointer to a valid LatencySleepModeInfoNV structure

-> 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

Success
Failure

See Also

VK_NV_low_latency2, Device, LatencySleepModeInfoNV, SwapchainKHR

latencySleepNV Source #

Arguments

:: MonadIO io 
=> Device

device is the device associated with swapchain.

device must be a valid Device handle

-> SwapchainKHR

swapchain is the swapchain to delay associated CPU work based on LatencySubmissionPresentIdNV submissions.

swapchain must be a valid SwapchainKHR handle

swapchain must have been created, allocated, or retrieved from device

-> LatencySleepInfoNV

pSleepInfo is a pointer to a LatencySleepInfoNV structure specifying the parameters of the latency sleep.

pSleepInfo must be a valid pointer to a valid LatencySleepInfoNV structure

-> 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

Success
Failure

See Also

VK_NV_low_latency2, Device, LatencySleepInfoNV, SwapchainKHR

setLatencyMarkerNV Source #

Arguments

:: MonadIO io 
=> Device

device is the device associated with swapchain.

device must be a valid Device handle

-> SwapchainKHR

swapchain is the swapchain to capture timestamps on.

swapchain must be a valid SwapchainKHR handle

swapchain must have been created, allocated, or retrieved from device

-> SetLatencyMarkerInfoNV

pLatencyMarkerInfo must be a valid pointer to a valid SetLatencyMarkerInfoNV structure

-> 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

getLatencyTimingsNV Source #

Arguments

:: MonadIO io 
=> Device

device is the device associated with swapchain.

device must be a valid Device handle

-> SwapchainKHR

swapchain is the swapchain to return data from.

swapchain must be a valid SwapchainKHR handle

swapchain must have been created, allocated, or retrieved from device

-> 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

queue is the VkQueue to be marked as out of band.

queue must be a valid Queue handle

-> OutOfBandQueueTypeInfoNV

pQueueTypeInfo is a pointer to a OutOfBandQueueTypeInfoNV structure specifying the queue type.

pQueueTypeInfo must be a valid pointer to a valid OutOfBandQueueTypeInfoNV structure

-> io () 

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

Instances details
Eq LatencySleepModeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable LatencySleepModeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show LatencySleepModeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct LatencySleepModeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct LatencySleepModeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero LatencySleepModeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

Instances details
Eq LatencySleepInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable LatencySleepInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show LatencySleepInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct LatencySleepInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct LatencySleepInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero LatencySleepInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

Instances details
Eq SetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable SetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show SetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct SetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct SetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero SetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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)

  • If timingCount is not 0, and pTimings is not NULL, pTimings must be a valid pointer to an array of timingCount LatencyTimingsFrameReportNV structures

See Also

VK_NV_low_latency2, LatencyTimingsFrameReportNV, StructureType, getLatencyTimingsNV

Constructors

GetLatencyMarkerInfoNV 

Fields

Instances

Instances details
Eq GetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable GetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show GetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct GetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct GetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero GetLatencyMarkerInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

data LatencyTimingsFrameReportNV Source #

VkLatencyTimingsFrameReportNV - Structure containing latency data

Members

The members of the LatencyTimingsFrameReportNV structure describe the following:

Valid Usage (Implicit)

See Also

VK_NV_low_latency2, GetLatencyMarkerInfoNV, StructureType

Constructors

LatencyTimingsFrameReportNV 

Fields

Instances

Instances details
Eq LatencyTimingsFrameReportNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable LatencyTimingsFrameReportNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show LatencyTimingsFrameReportNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct LatencyTimingsFrameReportNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct LatencyTimingsFrameReportNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero LatencyTimingsFrameReportNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

Instances details
Eq OutOfBandQueueTypeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable OutOfBandQueueTypeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show OutOfBandQueueTypeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct OutOfBandQueueTypeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct OutOfBandQueueTypeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero OutOfBandQueueTypeInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

VK_NV_low_latency2, StructureType

Constructors

LatencySubmissionPresentIdNV 

Fields

Instances

Instances details
Eq LatencySubmissionPresentIdNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable LatencySubmissionPresentIdNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show LatencySubmissionPresentIdNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct LatencySubmissionPresentIdNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct LatencySubmissionPresentIdNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero LatencySubmissionPresentIdNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

data SwapchainLatencyCreateInfoNV Source #

VkSwapchainLatencyCreateInfoNV - Specify that a swapchain will use low latency mode

Valid Usage (Implicit)

See Also

VK_NV_low_latency2, Bool32, StructureType

Constructors

SwapchainLatencyCreateInfoNV 

Fields

Instances

Instances details
Eq SwapchainLatencyCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable SwapchainLatencyCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show SwapchainLatencyCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct SwapchainLatencyCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct SwapchainLatencyCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero SwapchainLatencyCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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)

  • If presentModeCount is not 0, and pPresentModes is not NULL, pPresentModes must be a valid pointer to an array of presentModeCount PresentModeKHR values

See Also

VK_NV_low_latency2, PresentModeKHR, StructureType

Constructors

LatencySurfaceCapabilitiesNV 

Fields

Instances

Instances details
Eq LatencySurfaceCapabilitiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable LatencySurfaceCapabilitiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show LatencySurfaceCapabilitiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

FromCStruct LatencySurfaceCapabilitiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

ToCStruct LatencySurfaceCapabilitiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero LatencySurfaceCapabilitiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

VK_NV_low_latency2, SetLatencyMarkerInfoNV

Constructors

LatencyMarkerNV Int32 

Instances

Instances details
Eq LatencyMarkerNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Ord LatencyMarkerNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable LatencyMarkerNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Read LatencyMarkerNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show LatencyMarkerNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero LatencyMarkerNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

VK_NV_low_latency2, OutOfBandQueueTypeInfoNV

Instances

Instances details
Eq OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Ord OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Storable OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Read OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Show OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

Zero OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

type NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2" 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

Instances details
Eq SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Ord SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Storable SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Show SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

HasObjectType SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

IsHandle SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Zero SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

newtype PresentModeKHR Source #

VkPresentModeKHR - Presentation mode supported for a surface

Description

  • PRESENT_MODE_IMMEDIATE_KHR specifies 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_KHR specifies 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_KHR specifies 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 of presentMode that is required to be supported.
  • PRESENT_MODE_FIFO_RELAXED_KHR specifies 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_KHR specifies 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 the VK_GOOGLE_display_timing extension 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_KHR specifies 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_KHR specifies 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 modeImage usage flags
PRESENT_MODE_IMMEDIATE_KHRSurfaceCapabilitiesKHR::supportedUsageFlags
PRESENT_MODE_MAILBOX_KHRSurfaceCapabilitiesKHR::supportedUsageFlags
PRESENT_MODE_FIFO_KHRSurfaceCapabilitiesKHR::supportedUsageFlags
PRESENT_MODE_FIFO_RELAXED_KHRSurfaceCapabilitiesKHR::supportedUsageFlags
PRESENT_MODE_FIFO_LATEST_READY_KHRSurfaceCapabilitiesKHR::supportedUsageFlags
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHRSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRSharedPresentSurfaceCapabilitiesKHR::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 

Instances

Instances details
Eq PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Ord PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Storable PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Read PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Show PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Zero PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface