/ chapters / VK_EXT_hdr_metadata.txt
VK_EXT_hdr_metadata.txt
 1  // This section is included inside VK_KHR_swapchain
 2  
 3  == Hdr Metadata
 4  
 5  To improve color reproduction of content it is useful to have information
 6  that can be used to better reproduce the colors as seen on the mastering
 7  display.
 8  That information can be provided to an implementation by calling
 9  fname:vkSetHdrMetadataEXT.
10  The metadata will be applied to the specified sname:VkSwapchainKHR objects
11  at the next fname:vkQueuePresentKHR call using that sname:VkSwapchainKHR
12  object.
13  The metadata will persist until a subsequent fname:vkSetHdrMetadataEXT
14  changes it.
15  The definitions below are from the associated SMPTE 2086, CTA 861.3 and CIE
16  15:2004 specifications.
17  
18  The definition of fname:vkSetHdrMetadataEXT is:
19  
20  [open,refpage='vkSetHdrMetadataEXT',desc='function to set Hdr metadata',type='protos']
21  --
22  include::{generated}/api/protos/vkSetHdrMetadataEXT.txt[]
23  
24    * pname:device is the logical device where the swapchain(s) were created.
25    * pname:swapchainCount is the number of swapchains included in
26      pname:pSwapchains.
27    * pname:pSwapchains is a pointer to the array of pname:swapchainCount
28      sname:VkSwapchainKHR handles.
29    * pname:pMetadata is a pointer to the array of pname:swapchainCount
30      sname:VkHdrMetadataEXT structures.
31  
32  include::{generated}/validity/protos/vkSetHdrMetadataEXT.txt[]
33  --
34  
35  [open,refpage='VkXYColorEXT',desc='structure to specify X,Y chromaticity coordinates',type='structs']
36  --
37  include::{generated}/api/structs/VkXYColorEXT.txt[]
38  Chromaticity coordinates x and y are as specified in CIE 15:2004
39  "`Calculation of chromaticity coordinates`" (Section 7.3) and are limited to
40  between 0 and 1 for real colors for the mastering display.
41  
42  --
43  
44  [open,refpage='VkHdrMetadataEXT',desc='structure to specify Hdr metadata',type='structs']
45  --
46  include::{generated}/api/structs/VkHdrMetadataEXT.txt[]
47  
48    * pname:sType is the type of this structure.
49    * pname:pNext is `NULL` or a pointer to an extension-specific structure.
50    * pname:displayPrimaryRed is the mastering display's red primary in
51      chromaticity coordinates
52    * pname:displayPrimaryGreen is the mastering display's green primary in
53      chromaticity coordinates
54    * pname:displayPrimaryBlue is the mastering display's blue primary in
55      chromaticity coordinates
56    * pname:whitePoint is the mastering display's white-point in chromaticity
57      coordinates
58    * pname:maxLuminance is the maximum luminance of the mastering display in
59      nits
60    * pname:minLuminance is the minimum luminance of the mastering display in
61      nits
62    * pname:maxContentLightLevel is content's maximum luminance in nits
63    * pname:maxFrameAverageLightLevel is the maximum frame average light level
64      in nits
65  
66  include::{generated}/validity/structs/VkHdrMetadataEXT.txt[]
67  
68  [NOTE]
69  .Note
70  ====
71  The validity and use of this data is outside the scope of Vulkan.
72  ====
73  
74  --