D3D12: Wait for GPU on device destruction

This commit is contained in:
Austin Eng 2017-07-10 11:17:27 -04:00 committed by Austin Eng
parent f9c39d021e
commit afdcf7d828
1 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,10 @@ namespace d3d12 {
}
Device::~Device() {
// Wait for all in-flight commands to finish exeuting
const uint64_t currentSerial = GetSerial();
NextSerial();
WaitForSerial(currentSerial);
}
ComPtr<ID3D12Device> Device::GetD3D12Device() {