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