Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
Device.h File Reference

donner::gpu::Device - the abstract GPU device with shared fail-closed validation. More...

#include <cstdint>
#include <format>
#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"
Include dependency graph for Device.h:
This graph shows which files directly or indirectly include this file:

Classes

class  donner::gpu::Device
 Abstract GPU device: resource creation, queue writes, and submission with shared fail-closed validation (design 0053 "Proposed Architecture", "Validation layer"). 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 &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.

Detailed Description

donner::gpu::Device - the abstract GPU device with shared fail-closed validation.

Function Documentation

◆ ValidateTexelCopyInternal()

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.

Parameters
layoutRow layout to validate (256-aligned bytesPerRow covering one row, and rowsPerImage covering the copy height).
copySizeCopy extent in texels.
formatTexel format of the texture side of the copy.
contextOperation name for diagnostics.