rhi: d3d11: Fix swapchain format check
...to only return true for HDR formats that are sensible for Direct 3D. There are currently no other formats, but new ones may get added in the future. Change-Id: I4fc6d605da8f6bf2644a4e5c355ab8f1c62ad68d Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 8a1915e04e2969a358aa5004bbd511cd92ce7372) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c3c5a6bd95
commit
a0e949637d
@ -4904,8 +4904,10 @@ bool QD3D11SwapChain::isFormatSupported(Format f)
|
||||
|
||||
QRHI_RES_RHI(QRhiD3D11);
|
||||
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…
x
Reference in New Issue
Block a user