rhi: d3d: Print more details on swapchain creation failure

Dedicated cherry pick for 6.5 and 6.2.

Task-number: QTBUG-109708
Pick-to: 6.2
Change-Id: Iafd530764a9157b4f103c657da1418fae895d22c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2024-02-26 10:57:06 +01:00
parent 976895772e
commit c9354149fa

View File

@ -5082,8 +5082,11 @@ bool QD3D11SwapChain::createOrResize()
}
}
if (FAILED(hr)) {
qWarning("Failed to create D3D11 swapchain: %s",
qPrintable(QSystemError::windowsComString(hr)));
qWarning("Failed to create D3D11 swapchain: %s"
" (Width=%u Height=%u Format=%u SampleCount=%u BufferCount=%u Scaling=%u SwapEffect=%u Stereo=%u)",
qPrintable(QSystemError::windowsComString(hr)),
desc.Width, desc.Height, UINT(desc.Format), desc.SampleDesc.Count,
desc.BufferCount, UINT(desc.Scaling), UINT(desc.SwapEffect), UINT(desc.Stereo));
return false;
}
rhiD->dxgiFactory->MakeWindowAssociation(hwnd, DXGI_MWA_NO_WINDOW_CHANGES);