From 4b56f6c4f0167d4aee69682e83d58415ac2127f5 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 7 Aug 2019 21:49:43 -0700 Subject: Fixed out-of-memory issue when resizing D3D11 swap chain --- Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp index 1666a034..85d5e054 100644 --- a/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp @@ -173,6 +173,9 @@ void SwapChainD3D11Impl::UpdateSwapChain(bool CreateNew) m_SwapChainDesc.Height, SCDes.BufferDesc.Format, SCDes.Flags), "Failed to resize the DXGI swap chain"); + + // Call flush to release resources + pImmediateCtxD3D11->Flush(); } CreateRTVandDSV(); -- cgit v1.2.3