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

Typed immutable descriptors for donner::gpu resource creation. More...

#include <array>
#include <cstdint>
#include <optional>
#include <ostream>
#include <type_traits>
#include <variant>
#include <vector>
#include "donner/base/RcString.h"
#include "donner/gpu/Handles.h"
Include dependency graph for Descriptors.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::gpu::IsBitmaskEnum< T >
 Marks an enum as a bitmask, enabling operator|, operator&, operator|=, and HasAllFlags. More...
struct  donner::gpu::Extent2d
 A 2D extent in texels. More...
struct  donner::gpu::BufferDescriptor
 Descriptor for Device::createBuffer. More...
struct  donner::gpu::TextureDescriptor
 Descriptor for Device::createTexture. All Donner textures are 2D, single-mip. More...
struct  donner::gpu::TextureViewDescriptor
 Descriptor for Device::createTextureView. Views cover the whole texture. More...
struct  donner::gpu::SamplerDescriptor
 Descriptor for Device::createSampler. More...
struct  donner::gpu::BindGroupLayoutEntry
 One entry of a BindGroupLayoutDescriptor. More...
struct  donner::gpu::BindGroupLayoutDescriptor
 Descriptor for Device::createBindGroupLayout. More...
struct  donner::gpu::PipelineLayoutDescriptor
 Descriptor for Device::createPipelineLayout. More...
struct  donner::gpu::ShaderModuleDescriptor
 Descriptor for Device::createShaderModule. Source is trusted generated build output, never runtime input from documents. More...
struct  donner::gpu::VertexAttribute
 One vertex attribute within a VertexBufferLayout. More...
struct  donner::gpu::VertexBufferLayout
 Layout of one vertex buffer slot of a render pipeline. More...
struct  donner::gpu::BlendComponent
 One blend term (color or alpha) of a BlendState. More...
struct  donner::gpu::BlendState
 Blend state for one color target. More...
struct  donner::gpu::ColorTargetState
 One color target of a render pipeline's fragment stage. More...
struct  donner::gpu::VertexState
 Vertex stage of a RenderPipelineDescriptor. More...
struct  donner::gpu::FragmentState
 Fragment stage of a RenderPipelineDescriptor. More...
struct  donner::gpu::RenderPipelineDescriptor
 Descriptor for Device::createRenderPipeline. More...
struct  donner::gpu::RenderPassColorAttachment
 One color attachment of a RenderPassDescriptor. More...
struct  donner::gpu::RenderPassDescriptor
 Descriptor for CommandEncoder::beginRenderPass. More...
struct  donner::gpu::TexelCopyTextureInfo
 Source texture of a texture-to-buffer copy. Copies start at texel (0, 0). More...
struct  donner::gpu::TexelCopyBufferLayout
 Byte layout of texel rows in buffer or host memory for copy operations. More...
struct  donner::gpu::BufferBinding
 A buffer range bound through a bind group. More...
struct  donner::gpu::TextureViewBinding
 A texture view bound through a bind group. More...
struct  donner::gpu::SamplerBinding
 A sampler bound through a bind group. More...
struct  donner::gpu::BindGroupEntry
 One entry of a BindGroupDescriptor. The resource alternative must match the BindingType of the layout entry with the same binding index. More...
struct  donner::gpu::BindGroupDescriptor
 Descriptor for Device::createBindGroup. More...

Namespaces

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

Concepts

concept  donner::gpu::BitmaskEnum
 Concept satisfied by enums marked with IsBitmaskEnum.

Enumerations

enum class  donner::gpu::TextureFormat : uint8_t {
  RGBA8Unorm ,
  BGRA8Unorm ,
  R8Unorm
}
 Texture formats used by Donner render targets, masks, and image uploads. More...
enum class  donner::gpu::TextureUsage : uint32_t {
  None = 0 ,
  RenderAttachment = 1 << 0 ,
  Sampled = 1 << 1 ,
  CopySrc = 1 << 2 ,
  CopyDst = 1 << 3
}
 Texture usage flags. Combinable with |. More...
enum class  donner::gpu::BufferUsage : uint32_t {
  None = 0 ,
  Vertex = 1 << 0 ,
  Index = 1 << 1 ,
  Uniform = 1 << 2 ,
  Storage = 1 << 3 ,
  CopySrc = 1 << 4 ,
  CopyDst = 1 << 5 ,
  MapRead = 1 << 6
}
 Buffer usage flags. Combinable with |. More...
enum class  donner::gpu::ShaderStage : uint32_t {
  None = 0 ,
  Vertex = 1 << 0 ,
  Fragment = 1 << 1 ,
  Compute = 1 << 2
}
 Shader stage visibility flags for bindings. Combinable with |. More...
enum class  donner::gpu::ColorWriteMask : uint32_t {
  None = 0 ,
  Red = 1 << 0 ,
  Green = 1 << 1 ,
  Blue = 1 << 2 ,
  Alpha = 1 << 3 ,
  All = Red | Green | Blue | Alpha
}
 Per-channel color write mask for a color target. Combinable with |. More...
enum class  donner::gpu::FilterMode : uint8_t {
  Nearest ,
  Linear
}
 Sampler minification/magnification filter. More...
enum class  donner::gpu::AddressMode : uint8_t {
  ClampToEdge ,
  Repeat
}
 Sampler texture addressing mode. More...
enum class  donner::gpu::VertexFormat : uint8_t {
  Float32x2 ,
  Float32x4 ,
  Uint32
}
 Vertex attribute formats used by Donner pipelines. More...
enum class  donner::gpu::VertexStepMode : uint8_t {
  Vertex ,
  Instance
}
 Rate at which a vertex buffer is stepped through during a draw. More...
enum class  donner::gpu::PrimitiveTopology : uint8_t {
  TriangleList ,
  TriangleStrip
}
 Primitive topology for render pipelines. More...
enum class  donner::gpu::CullMode : uint8_t {
  None ,
  Back
}
 Face culling mode for render pipelines. More...
enum class  donner::gpu::BlendFactor : uint8_t {
  Zero ,
  One ,
  SrcAlpha ,
  OneMinusSrcAlpha
}
 Blend factors used by Donner pipelines (premultiplied-alpha compositing). More...
enum class  donner::gpu::BlendOperation : uint8_t {
  Add ,
  Max
}
 Blend operations used by Donner pipelines. More...
enum class  donner::gpu::BindingType : uint8_t {
  UniformBuffer ,
  ReadOnlyStorageBuffer ,
  SampledTexture2dFloat ,
  FilteringSampler
}
 Type of resource a bind group layout entry expects. More...
enum class  donner::gpu::LoadOp : uint8_t {
  Clear ,
  Load
}
 Load operation for a render pass color attachment. More...
enum class  donner::gpu::StoreOp : uint8_t {
  Store ,
  Discard
}
 Store operation for a render pass color attachment. More...
enum class  donner::gpu::ShaderSourceKind : uint8_t {
  Wgsl ,
  Msl
}
 Shader source language of a ShaderModuleDescriptor. More...

Functions

template<BitmaskEnum T>
constexpr T donner::gpu::operator| (T lhs, T rhs)
 Bitwise-or for bitmask enums.
template<BitmaskEnum T>
constexpr T donner::gpu::operator& (T lhs, T rhs)
 Bitwise-and for bitmask enums.
template<BitmaskEnum T>
constexpr T & donner::gpu::operator|= (T &lhs, T rhs)
 Bitwise-or-assign for bitmask enums.
template<BitmaskEnum T>
constexpr bool donner::gpu::HasAllFlags (T value, T flags)
 Returns true if value contains every flag in flags.
std::ostream & donner::gpu::operator<< (std::ostream &os, TextureFormat value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, TextureUsage value)
 Ostream output operator, e.g. RenderAttachment|CopySrc, or None when no flags are set.
std::ostream & donner::gpu::operator<< (std::ostream &os, BufferUsage value)
 Ostream output operator, e.g. Vertex|CopyDst, or None when no flags are set.
std::ostream & donner::gpu::operator<< (std::ostream &os, ShaderStage value)
 Ostream output operator, e.g. Vertex|Fragment, or None when no flags are set.
std::ostream & donner::gpu::operator<< (std::ostream &os, ColorWriteMask value)
 Ostream output operator, e.g. Red|Green|Blue|Alpha, or None when no flags are set.
std::ostream & donner::gpu::operator<< (std::ostream &os, FilterMode value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, AddressMode value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, VertexFormat value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, VertexStepMode value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, PrimitiveTopology value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, CullMode value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, BlendFactor value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, BlendOperation value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, BindingType value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, LoadOp value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, StoreOp value)
 Ostream output operator.
std::ostream & donner::gpu::operator<< (std::ostream &os, ShaderSourceKind value)
 Ostream output operator.
bool donner::gpu::IsKnownEnumValue (TextureFormat value)
 Returns true if value is a known enumerator. Every enum arriving through a descriptor is checked with these overloads so out-of-range casts fail closed with GpuErrorType::InvalidDescriptor instead of flowing into layout or copy math.
bool donner::gpu::IsKnownEnumValue (FilterMode value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (AddressMode value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (VertexFormat value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (VertexStepMode value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (PrimitiveTopology value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (CullMode value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (BlendFactor value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (BlendOperation value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (BindingType value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (LoadOp value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (StoreOp value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsKnownEnumValue (ShaderSourceKind value)
 Returns true if value is a known enumerator.
bool donner::gpu::IsValidBitmask (TextureUsage value)
 Returns true if value contains only known flag bits (an empty mask is bit-valid; emptiness is validated separately where required).
bool donner::gpu::IsValidBitmask (BufferUsage value)
 Returns true if value contains only known flag bits.
bool donner::gpu::IsValidBitmask (ShaderStage value)
 Returns true if value contains only known flag bits.
bool donner::gpu::IsValidBitmask (ColorWriteMask value)
 Returns true if value contains only known flag bits.
uint32_t donner::gpu::TextureFormatBytesPerTexel (TextureFormat format)
 Bytes per texel for a TextureFormat.
uint32_t donner::gpu::VertexFormatByteSize (VertexFormat format)
 Byte size of a VertexFormat.

Detailed Description

Typed immutable descriptors for donner::gpu resource creation.

The enum and descriptor surface is intentionally narrow: it covers the operations Geode's rendering and the editor actually use (design 0053 "Command model"), not a general GPU API. Descriptors are plain value types, immutable by convention; all validation happens in donner::gpu::Device operations, which fail closed on malformed input.

Enumeration Type Documentation

◆ AddressMode

enum class donner::gpu::AddressMode : uint8_t
strong

Sampler texture addressing mode.

Enumerator
ClampToEdge 

Clamp coordinates to the edge texel.

Repeat 

Wrap coordinates (pattern tiling).

◆ BindingType

enum class donner::gpu::BindingType : uint8_t
strong

Type of resource a bind group layout entry expects.

Enumerator
UniformBuffer 

Uniform buffer binding.

ReadOnlyStorageBuffer 

Read-only storage buffer binding.

SampledTexture2dFloat 

Sampled 2D float texture binding.

FilteringSampler 

Filtering sampler binding.

◆ BlendFactor

enum class donner::gpu::BlendFactor : uint8_t
strong

Blend factors used by Donner pipelines (premultiplied-alpha compositing).

Enumerator
Zero 

Factor 0.

One 

Factor 1.

SrcAlpha 

Factor (source alpha).

OneMinusSrcAlpha 

Factor (1 - source alpha).

◆ BlendOperation

enum class donner::gpu::BlendOperation : uint8_t
strong

Blend operations used by Donner pipelines.

Enumerator
Add 

Component-wise addition (premultiplied source-over).

Max 

Component-wise maximum (coverage / clip-mask union).

◆ BufferUsage

enum class donner::gpu::BufferUsage : uint32_t
strong

Buffer usage flags. Combinable with |.

Enumerator
None 

No usage; invalid for creation.

Vertex 

Bound as a vertex buffer.

Index 

Bound as an index buffer.

Uniform 

Bound as a uniform buffer.

Storage 

Bound as a read-only storage buffer.

CopySrc 

Source of copy operations.

CopyDst 

Destination of copies and queue writes.

MapRead 

Host-readable after readback.

◆ ColorWriteMask

enum class donner::gpu::ColorWriteMask : uint32_t
strong

Per-channel color write mask for a color target. Combinable with |.

Enumerator
None 

Write no channels.

Red 

Write the red channel.

Green 

Write the green channel.

Blue 

Write the blue channel.

Alpha 

Write the alpha channel.

All 

Write all channels.

◆ CullMode

enum class donner::gpu::CullMode : uint8_t
strong

Face culling mode for render pipelines.

Enumerator
None 

No culling; Donner geometry has no guaranteed winding.

Back 

Cull back faces.

◆ FilterMode

enum class donner::gpu::FilterMode : uint8_t
strong

Sampler minification/magnification filter.

Enumerator
Nearest 

Nearest-texel sampling.

Linear 

Bilinear sampling.

◆ LoadOp

enum class donner::gpu::LoadOp : uint8_t
strong

Load operation for a render pass color attachment.

Enumerator
Clear 

Clear to the attachment's clear color.

Load 

Preserve existing contents.

◆ PrimitiveTopology

enum class donner::gpu::PrimitiveTopology : uint8_t
strong

Primitive topology for render pipelines.

Enumerator
TriangleList 

Separate triangles.

TriangleStrip 

Triangle strip.

◆ ShaderSourceKind

enum class donner::gpu::ShaderSourceKind : uint8_t
strong

Shader source language of a ShaderModuleDescriptor.

Enumerator
Wgsl 

WGSL text.

Msl 

Metal Shading Language text.

◆ ShaderStage

enum class donner::gpu::ShaderStage : uint32_t
strong

Shader stage visibility flags for bindings. Combinable with |.

Enumerator
None 

No stage; invalid for bind group layout entries.

Vertex 

Visible to the vertex stage.

Fragment 

Visible to the fragment stage.

Compute 

Visible to the compute stage.

◆ StoreOp

enum class donner::gpu::StoreOp : uint8_t
strong

Store operation for a render pass color attachment.

Enumerator
Store 

Write results back to the texture.

Discard 

Discard results (transient attachments).

◆ TextureFormat

enum class donner::gpu::TextureFormat : uint8_t
strong

Texture formats used by Donner render targets, masks, and image uploads.

Enumerator
RGBA8Unorm 

8-bit RGBA, unsigned normalized. Default render target format.

BGRA8Unorm 

8-bit BGRA, unsigned normalized. Editor surface format.

R8Unorm 

8-bit single channel. Coverage / clip-mask textures.

◆ TextureUsage

enum class donner::gpu::TextureUsage : uint32_t
strong

Texture usage flags. Combinable with |.

Enumerator
None 

No usage; invalid for creation.

RenderAttachment 

Color attachment of a render pass.

Sampled 

Sampled in a shader.

CopySrc 

Source of copy operations (readback).

CopyDst 

Destination of copies and queue writes.

◆ VertexFormat

enum class donner::gpu::VertexFormat : uint8_t
strong

Vertex attribute formats used by Donner pipelines.

Enumerator
Float32x2 

Two 32-bit floats (8 bytes).

Float32x4 

Four 32-bit floats (16 bytes).

Uint32 

One 32-bit unsigned integer (4 bytes).

◆ VertexStepMode

enum class donner::gpu::VertexStepMode : uint8_t
strong

Rate at which a vertex buffer is stepped through during a draw.

Enumerator
Vertex 

Advance per vertex.

Instance 

Advance per instance.

Function Documentation

◆ HasAllFlags()

template<BitmaskEnum T>
bool donner::gpu::HasAllFlags ( T value,
T flags )
constexpr

Returns true if value contains every flag in flags.

Parameters
valueFlags to test.
flagsRequired flags.

◆ IsKnownEnumValue() [1/13]

bool donner::gpu::IsKnownEnumValue ( AddressMode value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [2/13]

bool donner::gpu::IsKnownEnumValue ( BindingType value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [3/13]

bool donner::gpu::IsKnownEnumValue ( BlendFactor value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [4/13]

bool donner::gpu::IsKnownEnumValue ( BlendOperation value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [5/13]

bool donner::gpu::IsKnownEnumValue ( CullMode value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [6/13]

bool donner::gpu::IsKnownEnumValue ( FilterMode value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [7/13]

bool donner::gpu::IsKnownEnumValue ( LoadOp value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [8/13]

bool donner::gpu::IsKnownEnumValue ( PrimitiveTopology value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [9/13]

bool donner::gpu::IsKnownEnumValue ( ShaderSourceKind value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [10/13]

bool donner::gpu::IsKnownEnumValue ( StoreOp value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [11/13]

bool donner::gpu::IsKnownEnumValue ( TextureFormat value)

Returns true if value is a known enumerator. Every enum arriving through a descriptor is checked with these overloads so out-of-range casts fail closed with GpuErrorType::InvalidDescriptor instead of flowing into layout or copy math.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [12/13]

bool donner::gpu::IsKnownEnumValue ( VertexFormat value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsKnownEnumValue() [13/13]

bool donner::gpu::IsKnownEnumValue ( VertexStepMode value)

Returns true if value is a known enumerator.

Parameters
valueValue to check.

◆ IsValidBitmask() [1/4]

bool donner::gpu::IsValidBitmask ( BufferUsage value)

Returns true if value contains only known flag bits.

Parameters
valueBitmask to check.

◆ IsValidBitmask() [2/4]

bool donner::gpu::IsValidBitmask ( ColorWriteMask value)

Returns true if value contains only known flag bits.

Parameters
valueBitmask to check.

◆ IsValidBitmask() [3/4]

bool donner::gpu::IsValidBitmask ( ShaderStage value)

Returns true if value contains only known flag bits.

Parameters
valueBitmask to check.

◆ IsValidBitmask() [4/4]

bool donner::gpu::IsValidBitmask ( TextureUsage value)

Returns true if value contains only known flag bits (an empty mask is bit-valid; emptiness is validated separately where required).

Parameters
valueBitmask to check.

◆ operator&()

template<BitmaskEnum T>
T donner::gpu::operator& ( T lhs,
T rhs )
constexpr

Bitwise-and for bitmask enums.

Parameters
lhsFirst operand.
rhsSecond operand.

◆ operator<<() [1/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
AddressMode value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [2/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
BindingType value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [3/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
BlendFactor value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [4/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
BlendOperation value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [5/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
BufferUsage value )

Ostream output operator, e.g. Vertex|CopyDst, or None when no flags are set.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [6/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
ColorWriteMask value )

Ostream output operator, e.g. Red|Green|Blue|Alpha, or None when no flags are set.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [7/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
CullMode value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [8/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
FilterMode value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [9/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
LoadOp value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [10/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
PrimitiveTopology value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [11/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
ShaderSourceKind value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [12/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
ShaderStage value )

Ostream output operator, e.g. Vertex|Fragment, or None when no flags are set.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [13/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
StoreOp value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [14/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
TextureFormat value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [15/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
TextureUsage value )

Ostream output operator, e.g. RenderAttachment|CopySrc, or None when no flags are set.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [16/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
VertexFormat value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator<<() [17/17]

std::ostream & donner::gpu::operator<< ( std::ostream & os,
VertexStepMode value )

Ostream output operator.

Parameters
osOutput stream.
valueValue to output.

◆ operator|()

template<BitmaskEnum T>
T donner::gpu::operator| ( T lhs,
T rhs )
constexpr

Bitwise-or for bitmask enums.

Parameters
lhsFirst operand.
rhsSecond operand.

◆ operator|=()

template<BitmaskEnum T>
T & donner::gpu::operator|= ( T & lhs,
T rhs )
constexpr

Bitwise-or-assign for bitmask enums.

Parameters
lhsValue to update.
rhsFlags to add.

◆ TextureFormatBytesPerTexel()

uint32_t donner::gpu::TextureFormatBytesPerTexel ( TextureFormat format)

Bytes per texel for a TextureFormat.

Parameters
formatTexture format.

◆ VertexFormatByteSize()

uint32_t donner::gpu::VertexFormatByteSize ( VertexFormat format)

Byte size of a VertexFormat.

Parameters
formatVertex attribute format.