Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodeMaskPipeline Class Reference

Caches a compiled render pipeline for the path-clip mask shader (donner/gpu/shader/programs/SlugMaskSource.h) plus its bind-group layout. More...

#include "donner/svg/renderer/geode/GeodePipeline.h"

Public Member Functions

 GeodeMaskPipeline (gpu::Device &device)
 Create a Slug mask pipeline for the given device.
 GeodeMaskPipeline (const GeodeMaskPipeline &)=delete
GeodeMaskPipeline & operator= (const GeodeMaskPipeline &)=delete
 GeodeMaskPipeline (GeodeMaskPipeline &&other) noexcept=default
 Construct by moving another instance's state.
GeodeMaskPipeline & operator= (GeodeMaskPipeline &&other) noexcept=default
 Replace this object's state by moving another instance.
const gpu::RenderPipeline & pipeline () const
 The compiled render pipeline.
const gpu::BindGroupLayout & bindGroupLayout () const
 The bind group layout used by the pipeline.
gpu::TextureFormat colorFormat () const
 The color format the pipeline targets. Always RGBA8Unorm.

Detailed Description

Caches a compiled render pipeline for the path-clip mask shader (donner/gpu/shader/programs/SlugMaskSource.h) plus its bind-group layout.

The mask pipeline is a stripped-down sibling of GeodePipeline - it reuses the same vertex shader and band/curve storage SSBOs. The fragment stage replicates scalar analytic coverage into an RGBA8Unorm color attachment. The resulting mask texture is then sampled by GeodePipeline and GeodeGradientPipeline as a clip coverage multiplier.

The bind group layout is:

  • binding 0: uniform buffer (mvp, viewport, fillRule).
  • binding 1: storage buffer (read-only) - Band[].
  • binding 2: storage buffer (read-only) - curve data (flat f32[]).
  • bindings 3 and 4: nested clip-mask texture + sampler.
  • bindings 5 and 6: vertical Band[] and canonical curve data.
  • bindings 7 and 8: horizontal and vertical dense band grids.
  • bindings 9 and 10: horizontal and vertical curve-reference indexes.

Multiple paths belonging to a single clip layer are unioned on the hardware side via BlendOperation::Max.

Constructor & Destructor Documentation

◆ GeodeMaskPipeline() [1/2]

donner::geode::GeodeMaskPipeline::GeodeMaskPipeline ( gpu::Device & device)
explicit

Create a Slug mask pipeline for the given device.

Renders into a single-sampled RGBA8Unorm texture.

Parameters
deviceRuntime device the pipeline and its layouts are created on.

◆ GeodeMaskPipeline() [2/2]

donner::geode::GeodeMaskPipeline::GeodeMaskPipeline ( GeodeMaskPipeline && other)
defaultnoexcept

Construct by moving another instance's state.

Parameters
otherSource object.

Member Function Documentation

◆ operator=()

GeodeMaskPipeline & donner::geode::GeodeMaskPipeline::operator= ( GeodeMaskPipeline && other)
defaultnoexcept

Replace this object's state by moving another instance.

Parameters
otherSource object.
Returns
This object after the move.

The documentation for this class was generated from the following file: