vulkan: Fix two more validation errors. (#1250)

This commit is contained in:
squidbus 2024-10-05 11:35:02 -07:00 committed by GitHub
parent 1dabea7514
commit ee57c2fd69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -197,6 +197,11 @@ void Swapchain::SetSurfaceProperties() {
void Swapchain::Destroy() {
vk::Device device = instance.GetDevice();
const auto wait_result = device.waitIdle();
if (wait_result != vk::Result::eSuccess) {
LOG_WARNING(Render_Vulkan, "Failed to wait for device to become idle: {}",
vk::to_string(wait_result));
}
if (swapchain) {
device.destroySwapchainKHR(swapchain);
}