HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_display_control

Name

VK_EXT_display_control - device extension

VK_EXT_display_control

Name String

VK_EXT_display_control

Extension Type

Device extension

Registered Extension Number

92

Revision

1

Ratification Status

Ratified

Extension and Version Dependencies

VK_EXT_display_surface_counter

and

VK_KHR_swapchain

Contact

Other Extension Metadata

Last Modified Date

2016-12-13

IP Status

No known IP claims.

Contributors
  • Pierre Boudier, NVIDIA

  • James Jones, NVIDIA

  • Damien Leone, NVIDIA

  • Pierre-Loup Griffais, Valve

  • Daniel Vetter, Intel

Description

This extension defines a set of utility functions for use with the VK_KHR_display and VK_KHR_display_swapchain extensions.

New Commands

New Structures

New Enums

New Enum Constants

Issues

1) Should this extension add an explicit “WaitForVsync” API or a fence signaled at vsync that the application can wait on?

RESOLVED: A fence. A separate API could later be provided that allows exporting the fence to a native object that could be inserted into standard run loops on POSIX and Windows systems.

2) Should callbacks be added for a vsync event, or in general to monitor events in Vulkan?

RESOLVED: No, fences should be used. Some events are generated by interrupts which are managed in the kernel. In order to use a callback provided by the application, drivers would need to have the userspace driver spawn threads that would wait on the kernel event, and hence the callbacks could be difficult for the application to synchronize with its other work given they would arrive on a foreign thread.

3) Should vblank or scanline events be exposed?

RESOLVED: Vblank events. Scanline events could be added by a separate extension, but the latency of processing an interrupt and waking up a userspace event is high enough that the accuracy of a scanline event would be rather low. Further, per-scanline interrupts are not supported by all hardware.

Version History

  • Revision 1, 2016-12-13 (James Jones)

    • Initial draft

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.

  • 13 types
  • 4 values
  • Packagevulkan-3.27
  • Exports25
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_display_control.hs
valuedisplayPowerControlEXT
  1. :: MonadIO io
  2. => Device

    device is a logical device associated with display.

  3. -> DisplayKHR

    display is the display whose power state is modified.

  4. -> DisplayPowerInfoEXT

    pDisplayPowerInfo is a pointer to a DisplayPowerInfoEXT structure specifying the new power state of display.

  5. -> io ()
#

vkDisplayPowerControlEXT - Set the power state of a display

Valid Usage (Implicit)

  • device must be a valid Device handle

  • display must be a valid DisplayKHR handle

  • pDisplayPowerInfo must be a valid pointer to a valid DisplayPowerInfoEXT structure

  • Both of device, and display must have been created, allocated, or retrieved from the same PhysicalDevice

Return Codes

Success
Failure

See Also

VK_EXT_display_control, Device, DisplayKHR, DisplayPowerInfoEXT

valueregisterDeviceEventEXT
  1. :: MonadIO io
  2. => Device

    device is a logical device on which the event may occur.

  3. -> DeviceEventInfoEXT

    pDeviceEventInfo is a pointer to a DeviceEventInfoEXT structure describing the event of interest to the application.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io Fence
#

vkRegisterDeviceEventEXT - Signal a fence when a device event occurs

Valid Usage (Implicit)

  • device must be a valid Device handle

  • pDeviceEventInfo must be a valid pointer to a valid DeviceEventInfoEXT structure

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • pFence must be a valid pointer to a Fence handle

Return Codes

Success
Failure

See Also

VK_EXT_display_control, AllocationCallbacks, Device, DeviceEventInfoEXT, Fence

valueregisterDisplayEventEXT
  1. :: MonadIO io
  2. => Device

    device is a logical device associated with display

  3. -> DisplayKHR

    display is the display on which the event may occur.

  4. -> DisplayEventInfoEXT

    pDisplayEventInfo is a pointer to a DisplayEventInfoEXT structure describing the event of interest to the application.

  5. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  6. -> io Fence
#

vkRegisterDisplayEventEXT - Signal a fence when a display event occurs

Valid Usage (Implicit)

  • device must be a valid Device handle

  • display must be a valid DisplayKHR handle

  • pDisplayEventInfo must be a valid pointer to a valid DisplayEventInfoEXT structure

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • pFence must be a valid pointer to a Fence handle

  • Both of device, and display must have been created, allocated, or retrieved from the same PhysicalDevice

Return Codes

Success
Failure

See Also

VK_EXT_display_control, AllocationCallbacks, Device, DisplayEventInfoEXT, DisplayKHR, Fence

valuegetSwapchainCounterEXT
  1. :: MonadIO io
  2. => Device

    device is the Device associated with swapchain.

  3. -> SwapchainKHR

    swapchain is the swapchain from which to query the counter value.

  4. -> SurfaceCounterFlagBitsEXT

    counter is a SurfaceCounterFlagBitsEXT value specifying the counter to query.

  5. -> io ("counterValue" ::: Word64)
#

vkGetSwapchainCounterEXT - Query the current value of a surface counter

Description

If a counter is not available because the swapchain is out of date, the implementation may return ERROR_OUT_OF_DATE_KHR.

Valid Usage

  • One or more present commands on swapchain must have been processed by the presentation engine

Valid Usage (Implicit)

  • device must be a valid Device handle

  • swapchain must be a valid SwapchainKHR handle

  • counter must be a valid SurfaceCounterFlagBitsEXT value

  • pCounterValue must be a valid pointer to a uint64_t value

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

Return Codes

Success
Failure

See Also

VK_EXT_display_control, Device, SurfaceCounterFlagBitsEXT, SwapchainKHR

datadata DisplayPowerInfoEXT
#

VkDisplayPowerInfoEXT - Describe the power state of a display

Valid Usage (Implicit)

See Also

VK_EXT_display_control, DisplayPowerStateEXT, StructureType, displayPowerControlEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
datadata DeviceEventInfoEXT
#

VkDeviceEventInfoEXT - Describe a device event to create

Valid Usage (Implicit)

See Also

VK_EXT_display_control, DeviceEventTypeEXT, StructureType, registerDeviceEventEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
datadata DisplayEventInfoEXT
#

VkDisplayEventInfoEXT - Describe a display event to create

Valid Usage (Implicit)

See Also

VK_EXT_display_control, DisplayEventTypeEXT, StructureType, registerDisplayEventEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkSwapchainCounterCreateInfoEXT - Specify the surface counters desired

Valid Usage

Valid Usage (Implicit)

Structure Chaining

Extends the structure

See Also

VK_EXT_display_control, StructureType, SurfaceCounterFlagsEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
newtypenewtype DisplayPowerStateEXT
#

VkDisplayPowerStateEXT - Possible power states for a display

Description

See Also

VK_EXT_display_control, DisplayPowerInfoEXT

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype DeviceEventTypeEXT
#

VkDeviceEventTypeEXT - Events that can occur on a device object

Description

  • DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT specifies that the fence is signaled when a display is plugged into or unplugged from the specified device. Applications can use this notification to determine when they need to re-enumerate the available displays on a device.

See Also

VK_EXT_display_control, DeviceEventInfoEXT

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype DisplayEventTypeEXT
#

VkDisplayEventTypeEXT - Events that can occur on a display object

Description

See Also

VK_EXT_display_control, DisplayEventInfoEXT

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype DisplayKHR
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype SwapchainKHR
#

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

Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype SurfaceCounterFlagBitsEXT
#

VkSurfaceCounterFlagBitsEXT - Surface-relative counter types

Description

  • SURFACE_COUNTER_VBLANK_BIT_EXT specifies a counter incrementing once every time a vertical blanking period occurs on the display associated with the surface.

See Also

VK_EXT_display_surface_counter, SurfaceCounterFlagsEXT, getSwapchainCounterEXT

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …