diff options
author | Simon Ser <contact@emersion.fr> | 2022-10-12 16:33:20 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-11-15 15:50:19 +0000 |
commit | d6e2ab5145aee876ad3bbfe4b485b0439cdc8295 (patch) | |
tree | 927ba8937251c8d2eb61fcf24d3d7da3a3510652 /render/vulkan | |
parent | 165352e32fb8bddb64f26dd4f4994db80a30901b (diff) |
render/vulkan: detect device loss
Diffstat (limited to 'render/vulkan')
-rw-r--r-- | render/vulkan/renderer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c index e35d4707..ef3184c3 100644 --- a/render/vulkan/renderer.c +++ b/render/vulkan/renderer.c @@ -922,7 +922,11 @@ static void vulkan_end(struct wlr_renderer *wlr_renderer) { VkResult res = vkQueueSubmit(renderer->dev->queue, submit_count, submit_infos, NULL); - if (res != VK_SUCCESS) { + if (res == VK_ERROR_DEVICE_LOST) { + wlr_log(WLR_ERROR, "vkQueueSubmit failed with VK_ERROR_DEVICE_LOST"); + wl_signal_emit_mutable(&wlr_renderer->events.lost, NULL); + return; + } else if (res != VK_SUCCESS) { wlr_vk_error("vkQueueSubmit", res); return; } |