donner::gpu::TextureExport - naming a texture of one runtime device on another.
More...
#include <atomic>#include <chrono>#include <cstdint>#include <memory>#include <mutex>#include <optional>#include <ostream>#include <utility>#include "donner/base/Utils.h"#include "donner/gpu/Descriptors.h"#include "donner/gpu/DeviceLost.h"Classes | |
| struct | donner::gpu::BackendDeviceIdentity |
| Which backend a device belongs to and which native device it records against. Two devices can name each other's textures only when both fields match. The pointers are compared, never dereferenced. More... | |
| class | donner::gpu::ExportedTextureBacking |
| Backend half of an exported texture: a reference to the native allocation, plus whatever a sibling device of the same backend needs to name it. More... | |
| class | donner::gpu::SubmissionCompletion |
| Thread-safe view of a producer's submission completion, read by consumers on their own threads. More... | |
| struct | donner::gpu::BackendTextureExport |
| What a backend reports when it exports one of its textures. More... | |
| struct | donner::gpu::SourceWait |
| Producer work one consumer submission is ordered after on the device, for a registration whose ordering is SourceOrdering::WaitOnDevice and whose producer work has not completed yet. More... | |
| class | donner::gpu::TextureExport |
| An immutable, thread-safe token naming one texture of a producer device, for registration on another runtime device over the same backend device. 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::SourceOrdering : uint8_t { SharedQueue , WaitForSource , WaitOnDevice } |
| How work a consumer submits against a registration is ordered after the producer's work. More... | |
Functions | |
| std::ostream & | donner::gpu::operator<< (std::ostream &os, SourceOrdering value) |
| Ostream output operator for SourceOrdering, e.g. | |
donner::gpu::TextureExport - naming a texture of one runtime device on another.
Two runtime devices over one backend device keep separate handle tables, serials and retirement, and they are often driven from different threads and may submit to different native queues. A texture of one is not a texture of the other until it is registered there. The producer exports the texture on its own thread, which is the only thread allowed to read its table; the consumer registers the export on its own thread and never touches the producer device. What crosses between the two is the token declared here.
|
strong |
How work a consumer submits against a registration is ordered after the producer's work.
| Enumerator | |
|---|---|
| SharedQueue | Producer and consumer hand their work to one native queue, so submission order is execution order and nothing has to wait. |
| WaitForSource | Producer and consumer submit to different native queues. Consumer work that names the registration may reach the queue only once the producer work it is ordered after has completed. |
| WaitOnDevice | Producer and consumer submit to different native queues, and the consumer's backend makes a submission that names the registration wait on the device for the producer work it is ordered after. The submission is accepted without a host wait for that work. The wait ends however the producer's work ends, failed or released by a loss of the producer's root, so the runtime orders on the device only a consumer that shares the producer's loss condition, and treats any other consumer as WaitForSource. The host can still wait: once a consumer's queue holds as many uncompleted command buffers behind such a wait as it allows, asking it for another blocks until the producer's work ends, the root is declared lost, or the system ends the stalled work. |
| std::ostream & donner::gpu::operator<< | ( | std::ostream & | os, |
| SourceOrdering | value ) |
Ostream output operator for SourceOrdering, e.g.
SharedQueue.
| os | Output stream. |
| value | Value to output. |