D3D12: Wait for GPU on device destruction
This commit is contained in:
parent
f9c39d021e
commit
afdcf7d828
|
@ -101,6 +101,10 @@ namespace d3d12 {
|
||||||
}
|
}
|
||||||
|
|
||||||
Device::~Device() {
|
Device::~Device() {
|
||||||
|
// Wait for all in-flight commands to finish exeuting
|
||||||
|
const uint64_t currentSerial = GetSerial();
|
||||||
|
NextSerial();
|
||||||
|
WaitForSerial(currentSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
ComPtr<ID3D12Device> Device::GetD3D12Device() {
|
ComPtr<ID3D12Device> Device::GetD3D12Device() {
|
||||||
|
|
Loading…
Reference in New Issue