vulkan-3.8.1: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_display_control

Description

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
Extension and Version Dependencies
  • Requires Vulkan 1.0
  • Requires VK_EXT_display_surface_counter
  • Requires 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

DeviceEventInfoEXT, DeviceEventTypeEXT, DisplayEventInfoEXT, DisplayEventTypeEXT, DisplayPowerInfoEXT, DisplayPowerStateEXT, SwapchainCounterCreateInfoEXT, displayPowerControlEXT, getSwapchainCounterEXT, registerDeviceEventEXT, registerDisplayEventEXT

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

displayPowerControlEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is a logical device associated with display.

-> DisplayKHR

display is the display whose power state is modified.

-> DisplayPowerInfoEXT

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

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

Device, DisplayKHR, DisplayPowerInfoEXT

registerDeviceEventEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

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

-> DeviceEventInfoEXT

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

-> ("allocator" ::: Maybe AllocationCallbacks)

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

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

AllocationCallbacks, Device, DeviceEventInfoEXT, Fence

registerDisplayEventEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is a logical device associated with display

-> DisplayKHR

display is the display on which the event may occur.

-> DisplayEventInfoEXT

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

-> ("allocator" ::: Maybe AllocationCallbacks)

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

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

AllocationCallbacks, Device, DisplayEventInfoEXT, DisplayKHR, Fence

getSwapchainCounterEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the Device associated with swapchain.

-> SwapchainKHR

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

-> SurfaceCounterFlagBitsEXT

counter is the counter to query.

-> 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
  • Both of device, and swapchain must have been created, allocated, or retrieved from the same Instance

Return Codes

Success
Failure

See Also

Device, SurfaceCounterFlagBitsEXT, SwapchainKHR

data DisplayPowerInfoEXT Source #

VkDisplayPowerInfoEXT - Describe the power state of a display

Valid Usage (Implicit)

See Also

DisplayPowerStateEXT, StructureType, displayPowerControlEXT

Constructors

DisplayPowerInfoEXT 

Fields

Instances

Instances details
Eq DisplayPowerInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show DisplayPowerInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable DisplayPowerInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

FromCStruct DisplayPowerInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

ToCStruct DisplayPowerInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero DisplayPowerInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

data DeviceEventInfoEXT Source #

VkDeviceEventInfoEXT - Describe a device event to create

Valid Usage (Implicit)

See Also

DeviceEventTypeEXT, StructureType, registerDeviceEventEXT

Constructors

DeviceEventInfoEXT 

Fields

Instances

Instances details
Eq DeviceEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show DeviceEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable DeviceEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

FromCStruct DeviceEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

ToCStruct DeviceEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero DeviceEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

data DisplayEventInfoEXT Source #

VkDisplayEventInfoEXT - Describe a display event to create

Valid Usage (Implicit)

See Also

DisplayEventTypeEXT, StructureType, registerDisplayEventEXT

Constructors

DisplayEventInfoEXT 

Fields

Instances

Instances details
Eq DisplayEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show DisplayEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable DisplayEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

FromCStruct DisplayEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

ToCStruct DisplayEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero DisplayEventInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

data SwapchainCounterCreateInfoEXT Source #

VkSwapchainCounterCreateInfoEXT - Specify the surface counters desired

Valid Usage

Valid Usage (Implicit)

See Also

StructureType, SurfaceCounterFlagsEXT

Constructors

SwapchainCounterCreateInfoEXT 

Fields

Instances

Instances details
Eq SwapchainCounterCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show SwapchainCounterCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable SwapchainCounterCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

FromCStruct SwapchainCounterCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

ToCStruct SwapchainCounterCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero SwapchainCounterCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

newtype DisplayPowerStateEXT Source #

VkDisplayPowerStateEXT - Possible power states for a display

See Also

DisplayPowerInfoEXT

Bundled Patterns

pattern DISPLAY_POWER_STATE_OFF_EXT :: DisplayPowerStateEXT

DISPLAY_POWER_STATE_OFF_EXT specifies that the display is powered down.

pattern DISPLAY_POWER_STATE_SUSPEND_EXT :: DisplayPowerStateEXT

DISPLAY_POWER_STATE_SUSPEND_EXT specifies that the display is put into a low power mode, from which it may be able to transition back to DISPLAY_POWER_STATE_ON_EXT more quickly than if it were in DISPLAY_POWER_STATE_OFF_EXT. This state may be the same as DISPLAY_POWER_STATE_OFF_EXT.

pattern DISPLAY_POWER_STATE_ON_EXT :: DisplayPowerStateEXT

DISPLAY_POWER_STATE_ON_EXT specifies that the display is powered on.

Instances

Instances details
Eq DisplayPowerStateEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Ord DisplayPowerStateEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Read DisplayPowerStateEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show DisplayPowerStateEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable DisplayPowerStateEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero DisplayPowerStateEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

newtype DeviceEventTypeEXT Source #

VkDeviceEventTypeEXT - Events that can occur on a device object

See Also

DeviceEventInfoEXT

Bundled Patterns

pattern DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT :: DeviceEventTypeEXT

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.

Instances

Instances details
Eq DeviceEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Ord DeviceEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Read DeviceEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show DeviceEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable DeviceEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero DeviceEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

newtype DisplayEventTypeEXT Source #

VkDisplayEventTypeEXT - Events that can occur on a display object

See Also

DisplayEventInfoEXT

Bundled Patterns

pattern DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT :: DisplayEventTypeEXT

DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT specifies that the fence is signaled when the first pixel of the next display refresh cycle leaves the display engine for the display.

Instances

Instances details
Eq DisplayEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Ord DisplayEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Read DisplayEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Show DisplayEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Storable DisplayEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

Zero DisplayEventTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_control

type EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control" Source #

pattern EXT_DISPLAY_CONTROL_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #

newtype DisplayKHR Source #

Constructors

DisplayKHR Word64 

Instances

Instances details
Eq DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Ord DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Show DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Storable DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Zero DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

HasObjectType DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

IsHandle DisplayKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

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

AcquireNextImageInfoKHR, BindImageMemorySwapchainInfoKHR, ImageSwapchainCreateInfoKHR, PresentInfoKHR, SwapchainCreateInfoKHR, acquireFullScreenExclusiveModeEXT, acquireNextImageKHR, createSharedSwapchainsKHR, createSwapchainKHR, destroySwapchainKHR, getPastPresentationTimingGOOGLE, getRefreshCycleDurationGOOGLE, getSwapchainCounterEXT, getSwapchainImagesKHR, getSwapchainStatusKHR, releaseFullScreenExclusiveModeEXT, setHdrMetadataEXT, setLocalDimmingAMD

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

Show SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Storable SwapchainKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Zero 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

newtype SurfaceCounterFlagBitsEXT Source #

VkSurfaceCounterFlagBitsEXT - Surface-relative counter types

See Also

SurfaceCounterFlagsEXT, getSwapchainCounterEXT

Bundled Patterns

pattern SURFACE_COUNTER_VBLANK_BIT_EXT :: SurfaceCounterFlagBitsEXT

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

Instances

Instances details
Eq SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Ord SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Read SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Show SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Storable SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Bits SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Methods

(.&.) :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT #

(.|.) :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT #

xor :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT #

complement :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT #

shift :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

rotate :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

zeroBits :: SurfaceCounterFlagBitsEXT #

bit :: Int -> SurfaceCounterFlagBitsEXT #

setBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

clearBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

complementBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

testBit :: SurfaceCounterFlagBitsEXT -> Int -> Bool #

bitSizeMaybe :: SurfaceCounterFlagBitsEXT -> Maybe Int #

bitSize :: SurfaceCounterFlagBitsEXT -> Int #

isSigned :: SurfaceCounterFlagBitsEXT -> Bool #

shiftL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

unsafeShiftL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

shiftR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

unsafeShiftR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

rotateL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

rotateR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT #

popCount :: SurfaceCounterFlagBitsEXT -> Int #

FiniteBits SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter

Zero SurfaceCounterFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_display_surface_counter