1// This section is included inside VK_KHR_swapchain 2 3== Hdr Metadata 4 5To improve color reproduction of content it is useful to have information 6that can be used to better reproduce the colors as seen on the mastering 7display. 8That information can be provided to an implementation by calling 9fname:vkSetHdrMetadataEXT. 10The metadata will be applied to the specified sname:VkSwapchainKHR objects 11at the next fname:vkQueuePresentKHR call using that sname:VkSwapchainKHR 12object. 13The metadata will persist until a subsequent fname:vkSetHdrMetadataEXT 14changes it. 15The definitions below are from the associated SMPTE 2086, CTA 861.3 and CIE 1615:2004 specifications. 17 18The definition of fname:vkSetHdrMetadataEXT is: 19 20[open,refpage='vkSetHdrMetadataEXT',desc='function to set Hdr metadata',type='protos'] 21-- 22include::../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 32include::../validity/protos/vkSetHdrMetadataEXT.txt[] 33-- 34 35[open,refpage='VkXYColorEXT',desc='structure to specify X,Y chromaticity coordinates',type='structs'] 36-- 37include::../api/structs/VkXYColorEXT.txt[] 38Chromaticity coordinates x and y are as specified in CIE 15:2004 39"`Calculation of chromaticity coordinates`" (Section 7.3) and are limited to 40between 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-- 46include::../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[NOTE] 67.Note 68==== 69The validity and use of this data is outside the scope of Vulkan and thus no 70+Valid Usage+ is given. 71==== 72 73-- 74