GPUDevice: Add ExecuteAndWaitForGPUIdle()

This commit is contained in:
Stenzek
2024-07-04 21:54:19 +10:00
parent 9fcc98a60a
commit 3749b812a3
11 changed files with 46 additions and 0 deletions

View File

@@ -2468,6 +2468,12 @@ void MetalDevice::WaitForPreviousCommandBuffers()
WaitForFenceCounter(m_current_fence_counter - 1);
}
void MetalDevice::ExecuteAndWaitForGPUIdle()
{
SubmitCommandBuffer(true);
CleanupObjects();
}
void MetalDevice::CleanupObjects()
{
const u64 counter = m_completed_fence_counter.load(std::memory_order_acquire);