rhi: d3d12: Fix swapchain format check

Change-Id: Ie2c19ce0aa2c30997a682ed25bc69b2b8e9f7ee0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit dc341ea284bf533967a1e70d60df92184cc112ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Laszlo Agocs 2023-06-07 14:22:51 +02:00 committed by Qt Cherry-pick Bot
parent 9479b55672
commit 91f9cce4ce

View File

@ -5790,8 +5790,10 @@ bool QD3D12SwapChain::isFormatSupported(Format f)
QRHI_RES_RHI(QRhiD3D12);
DXGI_OUTPUT_DESC1 desc1;
if (outputDesc1ForWindow(m_window, rhiD->activeAdapter, &desc1))
return desc1.ColorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020;
if (outputDesc1ForWindow(m_window, rhiD->activeAdapter, &desc1)) {
if (desc1.ColorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020)
return f == QRhiSwapChain::HDRExtendedSrgbLinear || f == QRhiSwapChain::HDR10;
}
return false;
}