donner::gpu::vulkan::VulkanQueueProgress - when the one queue every runtime device over a Vulkan root submits to last finished work, and fence waits that give up only when it stops.
More...
#include <vulkan/vulkan.h>#include <chrono>#include <cstdint>#include <functional>#include <mutex>#include <ostream>#include <span>#include <vector>#include "donner/gpu/DeviceLost.h"#include "donner/gpu/GpuResult.h"#include "donner/gpu/vulkan/VulkanLoader.h"Classes | |
| class | donner::gpu::vulkan::VulkanQueueProgress |
| When the one queue every runtime device over a Vulkan root submits to last made progress. More... | |
| struct | donner::gpu::vulkan::FenceProgressWait |
| How a fence wait bounded by queue progress ended, with the native result of its last step. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::gpu::vulkan::FenceProgressWaitEnd : uint8_t { Signalled , Stalled , RootLost , Failed } |
| How a fence wait bounded by queue progress ended, as WaitForFencesWhileQueueProgresses reports it. More... | |
Functions | |
| std::ostream & | donner::gpu::vulkan::operator<< (std::ostream &os, FenceProgressWaitEnd value) |
| Ostream output operator. | |
| FenceProgressWait | donner::gpu::vulkan::WaitForFencesWhileQueueProgresses (const VulkanApi &api, VkDevice device, std::span< const VkFence > fences, VulkanQueueProgress *progress, const DeviceLostState *rootLoss, std::chrono::steady_clock::duration stallBound, const std::function< void()> &stepHook={}) |
Waits for every one of fences to signal, giving up once the queue they are on has made no progress for stallBound. | |
donner::gpu::vulkan::VulkanQueueProgress - when the one queue every runtime device over a Vulkan root submits to last finished work, and fence waits that give up only when it stops.
|
strong |
How a fence wait bounded by queue progress ended, as WaitForFencesWhileQueueProgresses reports it.
| Enumerator | |
|---|---|
| Signalled | Every fence signalled. |
| Stalled | The queue made no progress for the bound. |
| RootLost | A device over the root declared the root lost first. |
| Failed | The wait itself failed; FenceProgressWait::result says how. |
| std::ostream & donner::gpu::vulkan::operator<< | ( | std::ostream & | os, |
| FenceProgressWaitEnd | value ) |
Ostream output operator.
| os | Output stream. |
| value | Value to output. |
| FenceProgressWait donner::gpu::vulkan::WaitForFencesWhileQueueProgresses | ( | const VulkanApi & | api, |
| VkDevice | device, | ||
| std::span< const VkFence > | fences, | ||
| VulkanQueueProgress * | progress, | ||
| const DeviceLostState * | rootLoss, | ||
| std::chrono::steady_clock::duration | stallBound, | ||
| const std::function< void()> & | stepHook = {} ) |
Waits for every one of fences to signal, giving up once the queue they are on has made no progress for stallBound.
The bound runs from the queue's last progress, which can predate the wait, so a new wait on a queue that was already seen to stop does not restart it; progress no one had looked for yet is timed by this wait's first look (see VulkanQueueProgress). Without a progress record the whole wait is bounded by stallBound instead. Waits in steps of at most 10 ms, looking for progress and for a loss declared over the root between them; with neither to look for, it waits once for the whole bound. Records nothing: each caller decides what its outcome means.
| api | Entry points of the fences' device. |
| device | Device the fences belong to. |
| fences | Fences to wait for, all of them. |
| progress | Progress of the queue the fences' work is on, or null when none is tracked. |
| rootLoss | Loss condition that ends the wait once declared, or null for a wait that has to prove the fence signalled whatever was declared, as teardown does. |
| stallBound | Longest the queue may go without progress. |
| stepHook | Run after every step that ends with the fence unsignalled; test seam. |