Explicit error types returned by donner::gpu APIs.
More...
#include <cstdint>#include <ostream>#include <string>#include <string_view>Classes | |
| struct | donner::gpu::GpuError |
An explicit error result from a donner::gpu operation, carrying the error category and a human-readable message that names the offending field or state so a failing test localizes the bug without a rerun. 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::GpuErrorType : uint8_t { InvalidDescriptor , InvalidHandle , DeviceMismatch , UsageMismatch , OutOfBounds , LimitExceeded , InvalidState , Unsupported , DeviceLost } |
| Category of a GPU runtime error. More... | |
Functions | |
| std::ostream & | donner::gpu::operator<< (std::ostream &os, GpuErrorType value) |
| Ostream output operator for donner::gpu::GpuErrorType, e.g. | |
| void | donner::gpu::PrintTo (const GpuError &error, std::ostream *os) |
| gtest PrintTo support for readable test failure messages. | |
Explicit error types returned by donner::gpu APIs.
|
strong |
Category of a GPU runtime error.
Every invalid descriptor, handle, or state transition fails closed by returning one of these categories wrapped in a donner::gpu::GpuError, in release builds too. Asserts are reserved for programmer invariants inside the runtime; invalid input never aborts.
| Enumerator | |
|---|---|
| InvalidDescriptor | A descriptor field is malformed (zero size, bad range, misalignment). |
| InvalidHandle | A handle is null, destroyed, or has a stale generation. |
| DeviceMismatch | A handle created by one device was used on another device. |
| UsageMismatch | A resource lacks the usage flag required by the operation. |
| OutOfBounds | An offset, size, or copy region exceeds the resource bounds. |
| LimitExceeded | A count or dimension exceeds a documented device limit. |
| InvalidState | The operation is refused in the current state, e.g. encoder order, an open mapping, or a bounded wait that gave up. |
| Unsupported | The requested feature is not supported by this runtime. |
| DeviceLost | Terminal device failure: in-flight work cannot complete and its results cannot be trusted. Unlike donner::gpu::GpuErrorType::InvalidState, retrying on the same device cannot recover; the device and its resources are gone. |
| std::ostream & donner::gpu::operator<< | ( | std::ostream & | os, |
| GpuErrorType | value ) |
Ostream output operator for donner::gpu::GpuErrorType, e.g.
InvalidDescriptor.
| os | Output stream. |
| value | Error type to output. |
|
inline |
gtest PrintTo support for readable test failure messages.
| error | Error to print. |
| os | Output stream. |