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

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_hdr_metadata

Name

VK_EXT_hdr_metadata - device extension

VK_EXT_hdr_metadata

Name String

VK_EXT_hdr_metadata

Extension Type

Device extension

Registered Extension Number

106

Revision

3

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_swapchain

Contact

Other Extension Metadata

Last Modified Date

2024-03-26

IP Status

No known IP claims.

Contributors
  • Courtney Goeltzenleuchter, Google

  • Sebastian Wick, Red Hat Inc.

  • Tobias Hector, AMD

Description

This extension defines two new structures and a function to assign SMPTE (the Society of Motion Picture and Television Engineers) 2086 metadata and CTA (Consumer Technology Association) 861.3 metadata to a swapchain.

SMPTE 2086 metadata defines the color volume of the display on which the content was optimized for viewing and includes the color primaries, white point, and luminance range. When such content is reproduced on another display, this metadata can be used by the presentation engine to improve processing of images. For instance, values in the image can first be clamped to the color volume described in the metadata, and then what remains can be remapped to the color volume of the presentation engine.

CTA 861.3 metadata additionally includes the maximum intended luminance for the content and the maximum average light level across frames.

This extension does not define exactly how this metadata is used, however, it simply provides a mechanism to provide it to the presentation engine. Presentation engines may process the image based on the metadata before displaying it, resulting in the image being modified outside of Vulkan. For example, the clamping of colors in the image to the color volume may change those values in the image itself.

The metadata does not override or otherwise influence the color space and color encoding.

New Commands

New Structures

New Enum Constants

Issues

1) Do we need a query function for the currently specified metadata?

No, Vulkan does not provide queries for state that the application can track on its own.

2) Should we specify default metadata if not specified by the application?

No, the metadata is optional and the absence of the metadata is well-defined.

Version History

  • Revision 1, 2016-12-27 (Courtney Goeltzenleuchter)

    • Initial version

  • Revision 2, 2018-12-19 (Courtney Goeltzenleuchter)

    • Correct implicit validity for VkHdrMetadataEXT structure

  • Revision 3, 2024-03-26 (Tobias Hector & Sebastian Wick)

    • Clarifications and removal of erroneous “reference monitor” term

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.

  • 5 types
  • 1 value
  • Packagevulkan-3.27
  • Exports8
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_hdr_metadata.hs
valuesetHdrMetadataEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device where the swapchain(s) were created.

  3. -> "swapchains" ::: Vector SwapchainKHR

    pSwapchains is a pointer to an array of swapchainCount SwapchainKHR handles.

  4. -> "metadata" ::: Vector (SomeStruct HdrMetadataEXT)

    pMetadata is a pointer to an array of swapchainCount HdrMetadataEXT structures.

  5. -> io ()
#

vkSetHdrMetadataEXT - Set HDR metadata

Description

The metadata will be applied to the specified SwapchainKHR objects at the next queuePresentKHR call using that SwapchainKHR object. The metadata will persist until a subsequent setHdrMetadataEXT changes it.

Valid Usage (Implicit)

  • device must be a valid Device handle

  • pSwapchains must be a valid pointer to an array of swapchainCount valid SwapchainKHR handles

  • pMetadata must be a valid pointer to an array of swapchainCount valid HdrMetadataEXT structures

  • swapchainCount must be greater than 0

  • Each element of pSwapchains must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to each member of pSwapchains must be externally synchronized

See Also

VK_EXT_hdr_metadata, Device, HdrMetadataEXT, SwapchainKHR

datadata XYColorEXT
#

VkXYColorEXT - Specify X,Y chromaticity coordinates

Description

Chromaticity coordinates are as specified in CIE 15:2004 “Calculation of chromaticity coordinates” (Section 7.3) and are limited to between 0 and 1 for real colors.

See Also

VK_EXT_hdr_metadata, HdrMetadataEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
datadata HdrMetadataEXT (es :: [Type])
#

VkHdrMetadataEXT - Specify HDR metadata

Description

If any of the above values are unknown, they can be set to 0.

The meta-data provided here is intended to be used as defined in the SMPTE 2086, CTA 861.3 and CIE 15:2004 specifications. The validity and use of this data is outside the scope of Vulkan.

Valid Usage (Implicit)

  • pNext must be NULL or a pointer to a valid instance of HdrVividDynamicMetadataHUAWEI

  • The sType value of each structure in the pNext chain must be unique

See Also

VK_EXT_hdr_metadata, StructureType, XYColorEXT, setHdrMetadataEXT

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero
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, …