Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
MetalDevice.h File Reference

donner::gpu::metal::MetalDevice - the Metal backend for the Donner GPU runtime. More...

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "donner/gpu/Device.h"
#include "donner/gpu/GpuLimits.h"
Include dependency graph for MetalDevice.h:

Classes

class  donner::gpu::metal::MetalDevice
 Metal backend of the Donner GPU runtime. More...
struct  donner::gpu::metal::MetalDevice::SystemCapabilities
 What the system default Metal device supports, which every device Create opens shares. More...
struct  donner::gpu::metal::MetalDevice::GpuFamilies
 The GPU families a Metal device belongs to, as far as its 2D texture limit depends on them. More...
struct  donner::gpu::metal::MetalDevice::WriteStats
 Snapshot of upload bookkeeping for tests and performance measurements. More...
struct  donner::gpu::metal::MetalDevice::NativeTextureUsage
 Native texture access reported by Metal, exposed for allocation-contract tests. More...

Namespaces

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

Detailed Description

donner::gpu::metal::MetalDevice - the Metal backend for the Donner GPU runtime.


Class Documentation

◆ donner::gpu::metal::MetalDevice::SystemCapabilities

struct donner::gpu::metal::MetalDevice::SystemCapabilities

What the system default Metal device supports, which every device Create opens shares.

Class Members
uint32_t maxTextureDimension2D = 0 Largest width or height of a 2D texture the device allocates, from its GPU family and capped at kMaxTextureDimension, the largest extent the runtime accepts.

◆ donner::gpu::metal::MetalDevice::GpuFamilies

struct donner::gpu::metal::MetalDevice::GpuFamilies

The GPU families a Metal device belongs to, as far as its 2D texture limit depends on them.

Class Members
bool apple3OrLater = false Apple family 3 or later.
bool mac = false Any Mac family. Every Metal device on macOS is in one, Apple silicon included.

◆ donner::gpu::metal::MetalDevice::WriteStats

struct donner::gpu::metal::MetalDevice::WriteStats

Snapshot of upload bookkeeping for tests and performance measurements.

Class Members
uint64_t inFlightStagingBytes = 0 Packed staging bytes retained until GPU completion.
uint64_t pendingStagingBytes = 0 Packed staging bytes reserved for those writes.
size_t pendingWrites = 0 Coalesced writes awaiting a normal submission.
uint64_t stagingAllocations = 0 Native upload staging allocations attempted.
uint64_t submittedUploadBatches = 0 Ordinary submissions containing queued writes.
uint64_t unalignedWriteWaits = 0 Resource waits needed by unaligned buffer writes.

◆ donner::gpu::metal::MetalDevice::NativeTextureUsage

struct donner::gpu::metal::MetalDevice::NativeTextureUsage

Native texture access reported by Metal, exposed for allocation-contract tests.

Class Members
bool renderTarget = false Native render-target usage.
bool shaderRead = false Native shader-read usage.
bool shaderWrite = false Native shader-write usage.