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:
parent
9479b55672
commit
91f9cce4ce
@ -5790,8 +5790,10 @@ bool QD3D12SwapChain::isFormatSupported(Format f)
|
|||||||
|
|
||||||
QRHI_RES_RHI(QRhiD3D12);
|
QRHI_RES_RHI(QRhiD3D12);
|
||||||
DXGI_OUTPUT_DESC1 desc1;
|
DXGI_OUTPUT_DESC1 desc1;
|
||||||
if (outputDesc1ForWindow(m_window, rhiD->activeAdapter, &desc1))
|
if (outputDesc1ForWindow(m_window, rhiD->activeAdapter, &desc1)) {
|
||||||
return desc1.ColorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020;
|
if (desc1.ColorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020)
|
||||||
|
return f == QRhiSwapChain::HDRExtendedSrgbLinear || f == QRhiSwapChain::HDR10;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user