Skip to content

Commit 3bf9ff6

Browse files
committed
DX11: удаляем буферы ID3D11Buffer до удаления ID3D11DeviceContext1 и ID3D11Device1.
1 parent 05f72d7 commit 3bf9ff6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Source/DX11VideoProcessor.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,11 @@ void CDX11VideoProcessor::ReleaseDevice()
675675
m_Alignment.cformat = {};
676676
m_Alignment.cx = {};
677677

678+
m_pVertexBuffer.Release();
679+
m_pResizeShaderConstantBuffer.Release();
680+
m_pHalfOUtoInterlaceConstantBuffer.Release();
681+
m_pFinalPassConstantBuffer.Release();
682+
678683
if (m_pDeviceContext) {
679684
// need ClearState() (see ReleaseVP()) and Flush() for ID3D11DeviceContext when using DXGI_SWAP_EFFECT_DISCARD in Windows 8/8.1
680685
m_pDeviceContext->Flush();
@@ -694,11 +699,6 @@ void CDX11VideoProcessor::ReleaseDevice()
694699
}
695700
#endif
696701

697-
m_pVertexBuffer.Release();
698-
m_pResizeShaderConstantBuffer.Release();
699-
m_pHalfOUtoInterlaceConstantBuffer.Release();
700-
m_pFinalPassConstantBuffer.Release();
701-
702702
m_pDevice.Release();
703703
}
704704

0 commit comments

Comments
 (0)