diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 15:51:40 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 15:51:40 +0100 |
| commit | df91c6624b69ee4e6c6eeca20ed68d331ed0e728 (patch) | |
| tree | 323c88b9df89bf8abaa2b98d10808474ab675dc2 /runtime/src/vulkan_scratch.h | |
| parent | b40d8039a98f57b26bd05860febbabbe59b97873 (diff) | |
| parent | 6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff) | |
Merge main into test/valu-int-misc (#1492)
Conflicted files: runtime/test/shaders/check.py, scripts/run_gpu_tests.py
AI-assisted.
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; |