upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 03:21:26 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 03:21:26 -0500
commit8665eee910cf4e3e3b86324ae025a6cbb0c64e69 (patch)
treefffa1b15186dbb147cd1e079c7e0f227fc19c569 /runtime/src
parentd4f3e0bbc63bbd47c7b0afa762f0f22fed5a5a2e (diff)
parent3f81d46ac01021bd7517f0cce153f4283bc8dd17 (diff)
Merge commit '3f81d46ac' into HEAD
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/vulkan_backend.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h
index 9652fd51b..5c3e884ba 100644
--- a/runtime/src/vulkan_backend.h
+++ b/runtime/src/vulkan_backend.h
@@ -2091,6 +2091,22 @@ public:
2091 return UINT64_MAX; 2091 return UINT64_MAX;
2092 } 2092 }
2093 if (result != VK_SUCCESS) return 0; 2093 if (result != VK_SUCCESS) return 0;
2094 if (value == UINT64_MAX) {
2095 // A lost device can show itself here first: measured on NVIDIA 621.24 and reported on 617.14, the counter
2096 // query succeeds with UINT64_MAX (and vkWaitSemaphores with a zero timeout succeeds too) before any call
2097 // has returned VK_ERROR_DEVICE_LOST. vkDeviceWaitIdle is what then says so, and it is also what a driver
2098 // needs to have returned before vkGetDeviceFaultInfoEXT answers (LEONIDA_DEVICE_FAULT=1). When
2099 // vkDeviceWaitIdle succeeds, nothing is recorded and the value is returned as the driver gave it.
2100 VkResult idle = VK_SUCCESS;
2101 {
2102 std::lock_guard lock(context_.submit_mutex());
2103 idle = context_.observe_result(context_.vk.vkDeviceWaitIdle(context_.device()),
2104 "vkDeviceWaitIdle (a fence counter of UINT64_MAX)");
2105 }
2106 if (idle == VK_ERROR_DEVICE_LOST)
2107 context_.mark_device_lost(
2108 "a fence's counter read UINT64_MAX and vkDeviceWaitIdle then returned VK_ERROR_DEVICE_LOST");
2109 }
2094 return value; 2110 return value;
2095 } 2111 }
2096 2112