mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 22:17:51 +00:00
D3D12: Wait for GPU on device destruction
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user