Fix name of Display-P3 linear color space.

The old `DCI_P3_LINEAR` enum is deprecated. Use
`VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT` instead. This is a closer match
for the Core Graphics name anyhow.
This commit is contained in:
Chip Davis 2019-08-06 15:49:34 -05:00
parent 0305557548
commit 57bcfe64f4
2 changed files with 2 additions and 2 deletions

View File

@ -497,7 +497,7 @@ VkResult MVKPhysicalDevice::getSurfaceFormats(MVKSurface* surface,
colorSpaces.push_back(VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT);
}
if (mvkOSVersion() >= 10.14) {
colorSpaces.push_back(VK_COLOR_SPACE_DCI_P3_LINEAR_EXT);
colorSpaces.push_back(VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT);
colorSpaces.push_back(VK_COLOR_SPACE_BT2020_LINEAR_EXT);
colorSpaces.push_back(VK_COLOR_SPACE_HDR10_ST2084_EXT);
colorSpaces.push_back(VK_COLOR_SPACE_HDR10_HLG_EXT);

View File

@ -308,7 +308,7 @@ void MVKSwapchain::initCAMetalLayer(const VkSwapchainCreateInfoKHR* pCreateInfo,
_mtlLayer.colorspace = CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB);
_mtlLayer.wantsExtendedDynamicRangeContentMVK = YES;
break;
case VK_COLOR_SPACE_DCI_P3_LINEAR_EXT:
case VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT:
_mtlLayer.colorspace = CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearDisplayP3);
_mtlLayer.wantsExtendedDynamicRangeContentMVK = YES;
break;