diff options
| author | totonii <totonicontato@gmail.com> | 2026-11-22 10:18:43 -0300 |
|---|---|---|
| committer | totonii <totonicontato@gmail.com> | 2026-11-22 10:18:43 -0300 |
| commit | 34a760fc73f4d3bf786513bb45944d4eedbe5ded (patch) | |
| tree | b6403e95322b46061189f196b03b0df1c8486207 /runtime/src/vulkan_scratch.h | |
| parent | a0acd33d77babe67a28e398b2936a9f735a50f5d (diff) | |
fix(vulkan): check vkGetSemaphoreCounterValue VkResult in ScratchBuffers and Depth24Converter collect()
Diffstat (limited to 'runtime/src/vulkan_scratch.h')
| -rw-r--r-- | runtime/src/vulkan_scratch.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/src/vulkan_scratch.h b/runtime/src/vulkan_scratch.h index fe29d1a5c..4a8a59ddd 100644 --- a/runtime/src/vulkan_scratch.h +++ b/runtime/src/vulkan_scratch.h | |||
| @@ -94,11 +94,14 @@ public: | |||
| 94 | // Keeps for reuse (or frees) the chunks of finished submissions. | 94 | // Keeps for reuse (or frees) the chunks of finished submissions. |
| 95 | void collect() { | 95 | void collect() { |
| 96 | for (std::size_t i = 0; i < retired_.size();) { | 96 | for (std::size_t i = 0; i < retired_.size();) { |
| 97 | std::uint64_t done = 0; | 97 | if (retired_[i].ticket != 0) { |
| 98 | if (retired_[i].timeline) vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done); | 98 | std::uint64_t done = 0; |
| 99 | if (done < retired_[i].ticket) { | 99 | if (!retired_[i].timeline || |
| 100 | ++i; | 100 | vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done) != VK_SUCCESS || |
| 101 | continue; | 101 | done < retired_[i].ticket) { |
| 102 | ++i; | ||
| 103 | continue; | ||
| 104 | } | ||
| 102 | } | 105 | } |
| 103 | for (auto& chunk : retired_[i].chunks) { | 106 | for (auto& chunk : retired_[i].chunks) { |
| 104 | chunk.used = 0; | 107 | chunk.used = 0; |