rhi: d3d11: Flush() when destroying a swapchain
Task-number: QTBUG-120276 Pick-to: 6.6 6.5 Change-Id: Iaf79c4dcf60d9a52bd562fd94976402cf570147d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit cff5a49cc20c3c9d98a5f97cd702a378ae29611b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
fdf06f5db9
commit
eb3529ea35
@ -4903,8 +4903,12 @@ void QD3D11SwapChain::destroy()
|
||||
}
|
||||
|
||||
QRHI_RES_RHI(QRhiD3D11);
|
||||
if (rhiD)
|
||||
if (rhiD) {
|
||||
rhiD->unregisterResource(this);
|
||||
// See Deferred Destruction Issues with Flip Presentation Swap Chains in
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-flush
|
||||
rhiD->context->Flush();
|
||||
}
|
||||
}
|
||||
|
||||
QRhiCommandBuffer *QD3D11SwapChain::currentFrameCommandBuffer()
|
||||
|
Loading…
x
Reference in New Issue
Block a user