|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
donner::gpu::Device - the abstract GPU device with shared fail-closed validation.
More...
#include <chrono>#include <cstdint>#include <format>#include <functional>#include <memory>#include <optional>#include <span>#include <string_view>#include <utility>#include <vector>#include "donner/gpu/Commands.h"#include "donner/gpu/Descriptors.h"#include "donner/gpu/GpuResult.h"#include "donner/gpu/Handles.h"Classes | |
| struct | donner::gpu::SurfaceTexture |
| A texture acquired from a surface for one frame, with the state the surface reported while handing it over. More... | |
| class | donner::gpu::Device |
| Abstract GPU device: resource creation, queue writes, and submission with shared fail-closed validation. More... | |
| struct | donner::gpu::Device::MapWaitTestHooks |
| Waits for a pending mapping in slices, until it completes, the caller stops it, the budget runs out, or the device is lost. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| Result< uint64_t > | donner::gpu::ValidateTexelCopyInternal (const TexelCopyBufferLayout &layout, const Extent2d ©Size, TextureFormat format, std::string_view context) |
| Internal: validates a texel copy layout against a copy extent and format, and returns the exclusive end byte offset the copy requires in the buffer or host memory it describes. | |
donner::gpu::Device - the abstract GPU device with shared fail-closed validation.
| struct donner::gpu::Device::MapWaitTestHooks |
Waits for a pending mapping in slices, until it completes, the caller stops it, the budget runs out, or the device is lost.
shouldCancel is consulted before each slice, so a caller that changes its mind stops within one slice rather than at the end of the budget. Device loss ends the wait immediately: the mapping can never complete afterwards, and reporting it as a timeout would describe a permanent failure as a slow one.
| mapping | Live mapping of this device. |
| params | Slice length and total budget; both must be greater than zero. |
| shouldCancel | Consulted before each slice; may be empty for an uncancellable wait. Test seam for waitForMapping. Production callers pass none; a test injects a clock and a rest so a budget is verified deterministically and without spending it. |
| Result< uint64_t > donner::gpu::ValidateTexelCopyInternal | ( | const TexelCopyBufferLayout & | layout, |
| const Extent2d & | copySize, | ||
| TextureFormat | format, | ||
| std::string_view | context ) |
Internal: validates a texel copy layout against a copy extent and format, and returns the exclusive end byte offset the copy requires in the buffer or host memory it describes.
Shared by Device::writeTexture and CommandEncoder::copyTextureToBuffer; not part of the public API.
| layout | Row layout to validate (256-aligned bytesPerRow covering one row, and rowsPerImage covering the copy height). |
| copySize | Copy extent in texels. |
| format | Texel format of the texture side of the copy. |
| context | Operation name for diagnostics. |