From fa89173486fb2f2d030e536dfeb38bd495cd1788 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 17 Aug 2023 14:12:41 +0200 Subject: [PATCH] rhi: vulkan: Handle the Display P3 enum value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Andy Nichols --- src/gui/rhi/qrhivulkan.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index c69c1fa7b2..98592dbf49 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -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; }