Class EXTHdrMetadata

java.lang.Object
org.lwjgl.vulkan.EXTHdrMetadata

public class EXTHdrMetadata extends Object
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.

Name String
VK_EXT_hdr_metadata
Extension Type
Device extension
Registered Extension Number
106
Revision
3
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
  • Field Details

    • VK_EXT_HDR_METADATA_SPEC_VERSION

      public static final int VK_EXT_HDR_METADATA_SPEC_VERSION
      The extension specification version.
      See Also:
    • VK_EXT_HDR_METADATA_EXTENSION_NAME

      public static final String VK_EXT_HDR_METADATA_EXTENSION_NAME
      The extension name.
      See Also:
    • VK_STRUCTURE_TYPE_HDR_METADATA_EXT

      public static final int VK_STRUCTURE_TYPE_HDR_METADATA_EXT
      Extends VkStructureType.
      See Also:
  • Method Details

    • nvkSetHdrMetadataEXT

      public static void nvkSetHdrMetadataEXT(org.lwjgl.vulkan.VkDevice device, int swapchainCount, long pSwapchains, long pMetadata)
      Unsafe version of: SetHdrMetadataEXT
      Parameters:
      swapchainCount - the number of swapchains included in pSwapchains.
    • vkSetHdrMetadataEXT

      public static void vkSetHdrMetadataEXT(org.lwjgl.vulkan.VkDevice device, LongBuffer pSwapchains, VkHdrMetadataEXT.Buffer pMetadata)
      Set HDR metadata.
      C Specification

      To provide HDR metadata to an implementation, call:

      
       void vkSetHdrMetadataEXT(
           VkDevice                                    device,
           uint32_t                                    swapchainCount,
           const VkSwapchainKHR*                       pSwapchains,
           const VkHdrMetadataEXT*                     pMetadata);
      Description

      The metadata will be applied to the specified VkSwapchainKHR objects at the next QueuePresentKHR call using that VkSwapchainKHR object. The metadata will persist until a subsequent vkSetHdrMetadataEXT changes it.

      Valid Usage (Implicit)
      • device must be a valid VkDevice handle
      • pSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handles
      • pMetadata must be a valid pointer to an array of swapchainCount valid VkHdrMetadataEXT structures
      • swapchainCount must be greater than 0
      • Each element of pSwapchains must have been created, allocated, or retrieved from device
      See Also

      VkHdrMetadataEXT

      Parameters:
      device - the logical device where the swapchain(s) were created.
      pSwapchains - a pointer to an array of swapchainCount VkSwapchainKHR handles.
      pMetadata - a pointer to an array of swapchainCount VkHdrMetadataEXT structures.
    • vkSetHdrMetadataEXT

      public static void vkSetHdrMetadataEXT(org.lwjgl.vulkan.VkDevice device, long[] pSwapchains, VkHdrMetadataEXT.Buffer pMetadata)
      Array version of: SetHdrMetadataEXT