rhi: d3d12: Fix swapchain format check
Pick-to: 6.6 Change-Id: Ie2c19ce0aa2c30997a682ed25bc69b2b8e9f7ee0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>bb10
parent
8a1915e04e
commit
dc341ea284
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue