1// Copyright 2018-2022 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5// This section is included inside VK_KHR_swapchain 6 7== Hdr Metadata 8 9This section describes how to improve color reproduction of content to 10better reproduce colors as seen on the reference monitor. 11Definitions below are from the associated SMPTE 2086, CTA 861.3 and CIE 1215:2004 specifications. 13 14[open,refpage='vkSetHdrMetadataEXT',desc='Set Hdr metadata',type='protos'] 15-- 16To provide Hdr metadata to an implementation, call: 17 18include::{generated}/api/protos/vkSetHdrMetadataEXT.adoc[] 19 20 * pname:device is the logical device where the swapchain(s) were created. 21 * pname:swapchainCount is the number of swapchains included in 22 pname:pSwapchains. 23 * pname:pSwapchains is a pointer to an array of pname:swapchainCount 24 slink:VkSwapchainKHR handles. 25 * pname:pMetadata is a pointer to an array of pname:swapchainCount 26 slink:VkHdrMetadataEXT structures. 27 28The metadata will be applied to the specified slink:VkSwapchainKHR objects 29at the next fname:vkQueuePresentKHR call using that slink:VkSwapchainKHR 30object. 31The metadata will persist until a subsequent fname:vkSetHdrMetadataEXT 32changes it. 33 34include::{generated}/validity/protos/vkSetHdrMetadataEXT.adoc[] 35-- 36 37[open,refpage='VkHdrMetadataEXT',desc='Specify Hdr metadata',type='structs'] 38-- 39The sname:VkHdrMetadataEXT structure is defined as: 40 41include::{generated}/api/structs/VkHdrMetadataEXT.adoc[] 42 43 * pname:sType is the type of this structure. 44 * pname:pNext is `NULL` or a pointer to a structure extending this 45 structure. 46 * pname:displayPrimaryRed is a slink:VkXYColorEXT structure specifying the 47 reference monitor's red primary in chromaticity coordinates 48 * pname:displayPrimaryGreen is a slink:VkXYColorEXT structure specifying 49 the reference monitor's green primary in chromaticity coordinates 50 * pname:displayPrimaryBlue is a slink:VkXYColorEXT structure specifying 51 the reference monitor's blue primary in chromaticity coordinates 52 * pname:whitePoint is a slink:VkXYColorEXT structure specifying the 53 reference monitor's white-point in chromaticity coordinates 54 * pname:maxLuminance is the maximum luminance of the reference monitor in 55 nits 56 * pname:minLuminance is the minimum luminance of the reference monitor in 57 nits 58 * pname:maxContentLightLevel is content's maximum luminance in nits 59 * pname:maxFrameAverageLightLevel is the maximum frame average light level 60 in nits 61 62include::{generated}/validity/structs/VkHdrMetadataEXT.adoc[] 63 64[NOTE] 65.Note 66==== 67The validity and use of this data is outside the scope of Vulkan. 68==== 69-- 70 71[open,refpage='VkXYColorEXT',desc='Specify X,Y chromaticity coordinates',type='structs'] 72-- 73The sname:VkXYColorEXT structure is defined as: 74 75include::{generated}/api/structs/VkXYColorEXT.adoc[] 76 77 * pname:x is the [eq]#x# chromaticity coordinate. 78 * pname:y is the [eq]#y# chromaticity coordinate. 79 80Chromaticity coordinates are as specified in CIE 15:2004 "`Calculation of 81chromaticity coordinates`" (Section 7.3) and are limited to between 0 and 1 82for real colors for the reference monitor. 83-- 84 85