vulkan-3.26.2: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
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
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

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

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

Documentation

setLatencySleepModeNV Source #

Arguments

:: forall io. 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.

Return Codes

Success
Failure

See Also

VK_NV_low_latency2, Device, LatencySleepModeInfoNV, SwapchainKHR

latencySleepNV Source #

Arguments

:: forall io. 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. It is recommended to call this function before input sampling. When using this function, it should be called exactly once between presents.

Return Codes

Success
Failure

See Also

VK_NV_low_latency2, Device, LatencySleepInfoNV, SwapchainKHR

setLatencyMarkerNV Source #

Arguments

:: forall io. 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.

Valid Usage (Implicit)

See Also

VK_NV_low_latency2, Device, SetLatencyMarkerInfoNV, SwapchainKHR

getLatencyTimingsNV Source #

Arguments

:: forall io. 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 ("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

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

  • lowLatencyMode :: Bool

    lowLatencyMode is the toggle to enable or disable low latency mode.

  • lowLatencyBoost :: Bool

    lowLatencyBoost allows an application to hint to the GPU to increase performance to provide additional latency savings at a cost of increased power consumption.

  • minimumIntervalUs :: Word32
     

Instances

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

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

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

Eq 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

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

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

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

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

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

VK_NV_low_latency2, StructureType

Instances

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

Eq 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

Instances

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

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

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

Eq 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 

Bundled Patterns

pattern LATENCY_MARKER_SIMULATION_START_NV :: LatencyMarkerNV

LATENCY_MARKER_SIMULATION_START_NV should be called at the start of the simulation execution each frame, but after the call to latencySleepNV.

pattern LATENCY_MARKER_SIMULATION_END_NV :: LatencyMarkerNV

LATENCY_MARKER_SIMULATION_END_NV should be called at the end of the simulation execution each frame.

pattern LATENCY_MARKER_RENDERSUBMIT_START_NV :: LatencyMarkerNV

LATENCY_MARKER_RENDERSUBMIT_START_NV should 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.

pattern LATENCY_MARKER_RENDERSUBMIT_END_NV :: LatencyMarkerNV

LATENCY_MARKER_RENDERSUBMIT_END_NV should be called at the end of the render submission execution each frame.

pattern LATENCY_MARKER_PRESENT_START_NV :: LatencyMarkerNV

LATENCY_MARKER_PRESENT_START_NV should be called just before queuePresentKHR.

pattern LATENCY_MARKER_PRESENT_END_NV :: LatencyMarkerNV

LATENCY_MARKER_PRESENT_END_NV should be called when queuePresentKHR returns.

pattern LATENCY_MARKER_INPUT_SAMPLE_NV :: LatencyMarkerNV

LATENCY_MARKER_INPUT_SAMPLE_NV should be called just before the application gathers input data.

pattern LATENCY_MARKER_TRIGGER_FLASH_NV :: LatencyMarkerNV

LATENCY_MARKER_TRIGGER_FLASH_NV should be called anywhere between LATENCY_MARKER_SIMULATION_START_NV and LATENCY_MARKER_SIMULATION_END_NV whenever a left mouse click occurs.

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

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

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

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

Bundled Patterns

pattern OUT_OF_BAND_QUEUE_TYPE_RENDER_NV :: OutOfBandQueueTypeNV

OUT_OF_BAND_QUEUE_TYPE_RENDER_NV indicates that work will be submitted to this queue.

pattern OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV :: OutOfBandQueueTypeNV

OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV indicates that this queue will be presented from.

Instances

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

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

Zero OutOfBandQueueTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_low_latency2

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

Instances details
Storable SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Show SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Eq SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Ord 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

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_SHARED_DEMAND_REFRESH_KHRSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRSharedPresentSurfaceCapabilitiesKHR::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

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.

pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR

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.

pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR

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.

pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR

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.

pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR

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.

pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR

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.

Instances

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

Eq PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Ord PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface

Zero PresentModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_surface