Skip to main content

Module compute

Module compute 

Source
Expand description

GPU Compute Buffer Layouts, Raw Curve Representations, and Compute Dispatchers.

Structs§

CurveComputeDispatcher
High-performance CPU dispatcher and simulator matching the WGSL compute pipeline layout.
GpuPathSegment
64-byte aligned output quadratic segment produced by compute shaders or CPU fallback.
GpuPathUniforms
16-byte aligned Uniform Buffer object for path compute operations.
RawCurveInput
64-byte aligned raw cubic curve input data fed into WebGPU compute pipelines.

Constants§

FLAG_CAP_ROUND
Flag indicating round stroke end caps (when paired with FLAG_START_OPEN / FLAG_END_OPEN).
FLAG_CAP_SQUARE
Flag indicating square stroke end caps (when paired with FLAG_START_OPEN / FLAG_END_OPEN).
FLAG_CLOSED
Flag indicating that the path segment is closed.
FLAG_END_OPEN
Flag indicating this segment’s end endpoint (p2) is an open subpath/dash cap.
FLAG_EVEN_ODD
Flag indicating Even-Odd fill rule (default is Non-Zero winding rule).
FLAG_FILL
Flag indicating that the path segment belongs to a filled polygon / region.
FLAG_JOIN_BEVEL
Flag indicating bevel corner joins (both FLAG_JOIN_ROUND and FLAG_JOIN_BEVEL clear = miter).
FLAG_JOIN_ROUND
Flag indicating round corner joins.
FLAG_START_OPEN
Flag indicating this segment’s start endpoint (p0) is an open subpath/dash cap.
FLAG_STROKE
Flag indicating that the path segment is stroked with a line width.
FLAG_TRIANGLE
Flag indicating (p0, p1, p2) encodes a filled 2D triangle (e.g. bevel/miter join wedge or clip).

Functions§

stroke_style_flags
Encodes LineCap, LineJoin, closure, and open-endpoint bits into a GpuPathSegment::flags bitmask.