diff options
Diffstat (limited to 'runtime/src/vulkan_depth24.h')
| -rw-r--r-- | runtime/src/vulkan_depth24.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/src/vulkan_depth24.h b/runtime/src/vulkan_depth24.h index 1bc9c8ba5..988b79d9f 100644 --- a/runtime/src/vulkan_depth24.h +++ b/runtime/src/vulkan_depth24.h | |||
| @@ -143,11 +143,14 @@ public: | |||
| 143 | // Frees (or keeps for reuse) what finished submissions used. | 143 | // Frees (or keeps for reuse) what finished submissions used. |
| 144 | void collect() { | 144 | void collect() { |
| 145 | for (std::size_t i = 0; i < retired_.size();) { | 145 | for (std::size_t i = 0; i < retired_.size();) { |
| 146 | std::uint64_t done = 0; | 146 | if (retired_[i].ticket != 0) { |
| 147 | vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done); | 147 | std::uint64_t done = 0; |
| 148 | if (done < retired_[i].ticket) { | 148 | if (!retired_[i].timeline || |
| 149 | ++i; | 149 | vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done) != VK_SUCCESS || |
| 150 | continue; | 150 | done < retired_[i].ticket) { |
| 151 | ++i; | ||
| 152 | continue; | ||
| 153 | } | ||
| 151 | } | 154 | } |
| 152 | for (auto& chunk : retired_[i].chunks) { | 155 | for (auto& chunk : retired_[i].chunks) { |
| 153 | chunk.used = 0; | 156 | chunk.used = 0; |