SDL: Vulkan: wait for all queues to be idle before destroying the device

From 2adbcce864cc3ee1d697f0edae2f4d6aafcbb422 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 29 Feb 2024 14:12:09 -0800
Subject: [PATCH] Vulkan: wait for all queues to be idle before destroying the
 device

---
 src/render/vulkan/SDL_render_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/render/vulkan/SDL_render_vulkan.c b/src/render/vulkan/SDL_render_vulkan.c
index 6dd17575eeb5..19387180a57d 100644
--- a/src/render/vulkan/SDL_render_vulkan.c
+++ b/src/render/vulkan/SDL_render_vulkan.c
@@ -1012,7 +1012,7 @@ static void VULKAN_DestroyRenderer(SDL_Renderer *renderer)
 {
     VULKAN_RenderData *rendererData = (VULKAN_RenderData *)renderer->driverdata;
     if (rendererData->device != VK_NULL_HANDLE) {
-        VULKAN_WaitForGPU(rendererData);
+        vkDeviceWaitIdle(rendererData->device);
         VULKAN_DestroyAll(renderer);
     }
     if (rendererData) {