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
GpuLimits.h File Reference

Documented validation limits enforced by donner::gpu::Device. More...

#include <cstdint>
Include dependency graph for GpuLimits.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Variables

constexpr uint32_t donner::gpu::kMaxTextureDimension = 16384
 Maximum texture width or height in texels.
constexpr uint64_t donner::gpu::kMaxBufferByteSize = uint64_t(1) << 30
 Maximum buffer size in bytes (1 GiB).
constexpr uint32_t donner::gpu::kMaxBindings = 32
 Maximum number of entries in one bind group layout, and the exclusive upper bound for binding indices.
constexpr uint32_t donner::gpu::kMaxBindGroups = 4
 Maximum number of bind groups in a pipeline layout, and the exclusive upper bound for setBindGroup indices.
constexpr uint32_t donner::gpu::kMaxVertexBuffers = 8
 Maximum number of vertex buffer layouts in a render pipeline, and the exclusive upper bound for setVertexBuffer slots.
constexpr uint32_t donner::gpu::kMaxVertexAttributes = 16
 Maximum total vertex attributes in a render pipeline, and the exclusive upper bound for attribute shader locations. 16 is the strictest common cap across the native APIs this runtime targets (well below Metal's 31 per-stage limit).
constexpr uint32_t donner::gpu::kMaxColorAttachments = 4
 Maximum number of color attachments in a render pass or render pipeline.
constexpr uint32_t donner::gpu::kTexelRowPitchAlignment = 256
 Required alignment of TexelCopyBufferLayout::bytesPerRow. 256 is the strictest row-pitch alignment across the native APIs this runtime targets, so enforcing it uniformly keeps copies portable without per-backend repacking. The same portability reasoning requires TexelCopyBufferLayout::offsetBytes to be aligned to the copied format's texel size.

Detailed Description

Documented validation limits enforced by donner::gpu::Device.

Limits exist so that untrusted SVG-derived dimensions (geometry volume, image sizes, render-target extents) fail deterministically with GpuErrorType::LimitExceeded instead of exhausting a driver (design 0053 "Security and Reliability").