Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- Not 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
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
- displayPowerControlEXT :: forall io. MonadIO io => Device -> DisplayKHR -> DisplayPowerInfoEXT -> io ()
- registerDeviceEventEXT :: forall io. MonadIO io => Device -> DeviceEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io Fence
- registerDisplayEventEXT :: forall io. MonadIO io => Device -> DisplayKHR -> DisplayEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io Fence
- getSwapchainCounterEXT :: forall io. MonadIO io => Device -> SwapchainKHR -> SurfaceCounterFlagBitsEXT -> io ("counterValue" ::: Word64)
- data DisplayPowerInfoEXT = DisplayPowerInfoEXT {}
- data DeviceEventInfoEXT = DeviceEventInfoEXT {}
- data DisplayEventInfoEXT = DisplayEventInfoEXT {}
- data SwapchainCounterCreateInfoEXT = SwapchainCounterCreateInfoEXT {}
- newtype DisplayPowerStateEXT where
- newtype DeviceEventTypeEXT where
- newtype DisplayEventTypeEXT where
- type EXT_DISPLAY_CONTROL_SPEC_VERSION = 1
- pattern EXT_DISPLAY_CONTROL_SPEC_VERSION :: forall a. Integral a => a
- type EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control"
- pattern EXT_DISPLAY_CONTROL_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype DisplayKHR = DisplayKHR Word64
- newtype SwapchainKHR = SwapchainKHR Word64
- newtype SurfaceCounterFlagBitsEXT where
- type SurfaceCounterFlagsEXT = SurfaceCounterFlagBitsEXT
Documentation
displayPowerControlEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> DisplayKHR |
|
-> DisplayPowerInfoEXT |
|
-> io () |
vkDisplayPowerControlEXT - Set the power state of a display
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
display
must be a validDisplayKHR
handle -
pDisplayPowerInfo
must be a valid pointer to a validDisplayPowerInfoEXT
structure - Both of
device
, anddisplay
must have been created, allocated, or retrieved from the samePhysicalDevice
Return Codes
See Also
VK_EXT_display_control,
Device
, DisplayKHR
,
DisplayPowerInfoEXT
registerDeviceEventEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> DeviceEventInfoEXT |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io Fence |
vkRegisterDeviceEventEXT - Signal a fence when a device event occurs
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pDeviceEventInfo
must be a valid pointer to a validDeviceEventInfoEXT
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pFence
must be a valid pointer to aFence
handle
Return Codes
See Also
VK_EXT_display_control,
AllocationCallbacks
,
Device
, DeviceEventInfoEXT
,
Fence
registerDisplayEventEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> DisplayKHR |
|
-> DisplayEventInfoEXT |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io Fence |
vkRegisterDisplayEventEXT - Signal a fence when a display event occurs
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
display
must be a validDisplayKHR
handle -
pDisplayEventInfo
must be a valid pointer to a validDisplayEventInfoEXT
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pFence
must be a valid pointer to aFence
handle - Both of
device
, anddisplay
must have been created, allocated, or retrieved from the samePhysicalDevice
Return Codes
See Also
VK_EXT_display_control,
AllocationCallbacks
,
Device
, DisplayEventInfoEXT
,
DisplayKHR
, Fence
getSwapchainCounterEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> SwapchainKHR |
|
-> SurfaceCounterFlagBitsEXT |
|
-> 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
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
swapchain
must be a validSwapchainKHR
handle -
counter
must be a validSurfaceCounterFlagBitsEXT
value -
pCounterValue
must be a valid pointer to auint64_t
value -
swapchain
must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_EXT_display_control,
Device
,
SurfaceCounterFlagBitsEXT
,
SwapchainKHR
data DisplayPowerInfoEXT Source #
VkDisplayPowerInfoEXT - Describe the power state of a display
Valid Usage (Implicit)
See Also
VK_EXT_display_control,
DisplayPowerStateEXT
,
StructureType
,
displayPowerControlEXT
DisplayPowerInfoEXT | |
|
Instances
data DeviceEventInfoEXT Source #
VkDeviceEventInfoEXT - Describe a device event to create
Valid Usage (Implicit)
See Also
VK_EXT_display_control,
DeviceEventTypeEXT
, StructureType
,
registerDeviceEventEXT
DeviceEventInfoEXT | |
|
Instances
data DisplayEventInfoEXT Source #
VkDisplayEventInfoEXT - Describe a display event to create
Valid Usage (Implicit)
See Also
VK_EXT_display_control,
DisplayEventTypeEXT
,
StructureType
,
registerDisplayEventEXT
DisplayEventInfoEXT | |
|
Instances
data SwapchainCounterCreateInfoEXT Source #
VkSwapchainCounterCreateInfoEXT - Specify the surface counters desired
Valid Usage
- The
bits in
surfaceCounters
must be supported bySwapchainCreateInfoKHR
::surface
, as reported bygetPhysicalDeviceSurfaceCapabilities2EXT
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT
-
surfaceCounters
must be a valid combination ofSurfaceCounterFlagBitsEXT
values
See Also
VK_EXT_display_control,
StructureType
,
SurfaceCounterFlagsEXT
SwapchainCounterCreateInfoEXT | |
|
Instances
newtype DisplayPowerStateEXT Source #
VkDisplayPowerStateEXT - Possible power states for a display
See Also
pattern DISPLAY_POWER_STATE_OFF_EXT :: DisplayPowerStateEXT |
|
pattern DISPLAY_POWER_STATE_SUSPEND_EXT :: DisplayPowerStateEXT |
|
pattern DISPLAY_POWER_STATE_ON_EXT :: DisplayPowerStateEXT |
|
Instances
newtype DeviceEventTypeEXT Source #
VkDeviceEventTypeEXT - Events that can occur on a device object
See Also
pattern DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT :: DeviceEventTypeEXT |
|
Instances
newtype DisplayEventTypeEXT Source #
VkDisplayEventTypeEXT - Events that can occur on a display object
See Also
pattern DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT :: DisplayEventTypeEXT |
|
Instances
type EXT_DISPLAY_CONTROL_SPEC_VERSION = 1 Source #
pattern EXT_DISPLAY_CONTROL_SPEC_VERSION :: forall a. Integral a => a Source #
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 #
VkDisplayKHR - Opaque handle to a display object
See Also
VK_KHR_display,
DisplayPlanePropertiesKHR
,
DisplayPropertiesKHR
,
acquireDrmDisplayEXT
,
acquireWinrtDisplayNV
,
acquireXlibDisplayEXT
,
createDisplayModeKHR
,
displayPowerControlEXT
,
getDisplayModeProperties2KHR
,
getDisplayModePropertiesKHR
,
getDisplayPlaneSupportedDisplaysKHR
,
getDrmDisplayEXT
,
getRandROutputDisplayEXT
,
getWinrtDisplayNV
,
registerDisplayEventEXT
,
releaseDisplayEXT
Instances
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
Instances
newtype SurfaceCounterFlagBitsEXT Source #
VkSurfaceCounterFlagBitsEXT - Surface-relative counter types
See Also
VK_EXT_display_surface_counter,
SurfaceCounterFlagsEXT
,
getSwapchainCounterEXT
pattern SURFACE_COUNTER_VBLANK_BIT_EXT :: SurfaceCounterFlagBitsEXT |
|