Vulkan: handle VK_ERROR_DEVICE_LOST gracefully (log, notify, recover) #135

Open
opened 2026-09-28 02:29:23 +00:00 by backspace119 · 0 comments
Owner

Related: #107.

A tester's crash (0.11.0-beta.1, GTX 1070 Ti, second viewer + Overwolf Vulkan overlay running) was a GPU device loss: renderFrame -> VkSwapchain::acquire -> vkWaitForFences returned VK_ERROR_DEVICE_LOST and VK_CHECK called abort() (0xC0000409, fast-fail 7). The log simply stops (after a ~12 s gap consistent with a TDR), so users see an unexplained exit.

  • Detect DEVICE_LOST at every wait/submit/present/acquire site (not via VK_CHECK abort).
  • Log it explicitly (plus the last GPU breadcrumb once that ticket lands), and show a user-facing message: graphics driver reset, possible causes (overlays such as Overwolf, running other GPU-heavy apps, driver issues).
  • Stretch: recover by recreating the VkDevice and all renderer resources (swapchain, renderer, textures re-upload) instead of exiting; at minimum exit cleanly with a proper crash/marker entry.
Related: #107. A tester's crash (0.11.0-beta.1, GTX 1070 Ti, second viewer + Overwolf Vulkan overlay running) was a GPU device loss: `renderFrame -> VkSwapchain::acquire -> vkWaitForFences` returned `VK_ERROR_DEVICE_LOST` and `VK_CHECK` called `abort()` (0xC0000409, fast-fail 7). The log simply stops (after a ~12 s gap consistent with a TDR), so users see an unexplained exit. - Detect DEVICE_LOST at every wait/submit/present/acquire site (not via VK_CHECK abort). - Log it explicitly (plus the last GPU breadcrumb once that ticket lands), and show a user-facing message: graphics driver reset, possible causes (overlays such as Overwolf, running other GPU-heavy apps, driver issues). - Stretch: recover by recreating the VkDevice and all renderer resources (swapchain, renderer, textures re-upload) instead of exiting; at minimum exit cleanly with a proper crash/marker entry.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
backspace119/Slipstream#135
No description provided.