From cae6c784030dce1693cf76fa4bf2442ce94c3164 Mon Sep 17 00:00:00 2001 From: LunaDL <91587464+EnzoDLofi@users.noreply.github.com> Date: Fri, 27 Nov 2026 20:53:13 -0400 Subject: [PATCH] fix(vulkan): notify modules on device loss --- app/src/main/cpp/waylandcomp/src/vk_present.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/cpp/waylandcomp/src/vk_present.c b/app/src/main/cpp/waylandcomp/src/vk_present.c index c864102e69..21fd788e02 100644 --- a/app/src/main/cpp/waylandcomp/src/vk_present.c +++ b/app/src/main/cpp/waylandcomp/src/vk_present.c @@ -2201,6 +2201,10 @@ static void device_lost(const char *where) { if (g_dev_state == -2) return; g_dev_state = -2; g_base_black = 0; + /* Notify modules before invalidating swapchain resources so they stop using + * device-owned objects and release any device-loss-specific bookkeeping. */ + vkp_framegen_device_lost(); + vkp_gpu_busy_device_lost(); droiddeck_log("error", "GPU device lost (VK_ERROR_DEVICE_LOST in %s): the compositor will try one in-process recovery", where); set_fault("the display GPU was lost (VK_ERROR_DEVICE_LOST in %s); recovery pending", where);