mirror of
https://github.com/patchzyy/wiicompiled
synced 2026-10-19 05:04:49 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b92c7d65f1 |
@@ -893,9 +893,14 @@ void release_surface() noexcept {
|
||||
}
|
||||
g_surface = {};
|
||||
if (hadSurface && g_instance && g_device && g_queue) {
|
||||
// Retired swapchain is freed after a later submission completes and the device ticks.
|
||||
submit_staging_commands(g_device.CreateCommandEncoder().Finish());
|
||||
const auto future = g_queue.OnSubmittedWorkDone(
|
||||
wgpu::CallbackMode::WaitAnyOnly, [](wgpu::QueueWorkDoneStatus, wgpu::StringView) {});
|
||||
g_instance.WaitAny(future, 1000000000);
|
||||
if (const auto status = g_instance.WaitAny(future, 1000000000); status != wgpu::WaitStatus::Success) {
|
||||
Log.warn("Timed out waiting for queue idle on surface release: {}", magic_enum::enum_name(status));
|
||||
}
|
||||
g_device.Tick();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user