rhi: d3d: Skip MakeWindowAssoc. when using dcomp
It has no purpose (like Alt+Enter is not functional anyway when we created the swapchain for composition), and with D3D12 there is a warning printed (with the debug layer enabled?) about this. So move the call to the appropriate branch. Pick-to: 6.6 Change-Id: I266ae6835bcc49b3ba8d84e5d08ab9115c6401e0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>bb10
parent
51b9762685
commit
300da03e3a
|
|
@ -5157,6 +5157,9 @@ bool QD3D11SwapChain::createOrResize()
|
|||
qWarning("Failed to set content for Direct Composition visual: %s",
|
||||
qPrintable(QSystemError::windowsComString(hr)));
|
||||
}
|
||||
} else {
|
||||
// disable Alt+Enter; not relevant when using DirectComposition
|
||||
rhiD->dxgiFactory->MakeWindowAssociation(hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
}
|
||||
}
|
||||
if (FAILED(hr)) {
|
||||
|
|
@ -5164,7 +5167,6 @@ bool QD3D11SwapChain::createOrResize()
|
|||
qPrintable(QSystemError::windowsComString(hr)));
|
||||
return false;
|
||||
}
|
||||
rhiD->dxgiFactory->MakeWindowAssociation(hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
} else {
|
||||
releaseBuffers();
|
||||
// flip model -> buffer count is the real buffer count, not 1 like with the legacy modes
|
||||
|
|
|
|||
|
|
@ -6003,13 +6003,15 @@ bool QD3D12SwapChain::createOrResize()
|
|||
qWarning("Failed to set content for Direct Composition visual: %s",
|
||||
qPrintable(QSystemError::windowsComString(hr)));
|
||||
}
|
||||
} else {
|
||||
// disable Alt+Enter; not relevant when using DirectComposition
|
||||
rhiD->dxgiFactory->MakeWindowAssociation(hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
}
|
||||
}
|
||||
if (FAILED(hr)) {
|
||||
qWarning("Failed to create D3D12 swapchain: %s", qPrintable(QSystemError::windowsComString(hr)));
|
||||
return false;
|
||||
}
|
||||
rhiD->dxgiFactory->MakeWindowAssociation(hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
|
||||
for (int i = 0; i < QD3D12_FRAMES_IN_FLIGHT; ++i) {
|
||||
hr = rhiD->dev->CreateFence(0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue