rhi: vulkan: Handle the Display P3 enum value

For parity with Metal. VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT is
mapped to kCGColorSpaceExtendedLinearDisplayP3 by MoltenVK.

Change-Id: Idba4ed56c029c1dea166e278ec6fc3f41e5ac471
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2023-08-17 14:12:41 +02:00
parent 38b13e562b
commit fa89173486

View File

@ -7512,6 +7512,9 @@ static inline bool hdrFormatMatchesVkSurfaceFormat(QRhiSwapChain::Format f, cons
case QRhiSwapChain::HDR10:
return (s.format == VK_FORMAT_A2B10G10R10_UNORM_PACK32 || s.format == VK_FORMAT_A2R10G10B10_UNORM_PACK32)
&& s.colorSpace == VK_COLOR_SPACE_HDR10_ST2084_EXT;
case QRhiSwapChain::HDRExtendedDisplayP3Linear:
return s.format == VK_FORMAT_R16G16B16A16_SFLOAT
&& s.colorSpace == VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT;
default:
break;
}