Skip to main content

Module strips

Module strips 

Source
Expand description

The strip instance the vertex shader steps over, and the conversion into it from a rasterized Strip.

One GpuStrip is one instance of a four-vertex quad: there is no geometry buffer at all, the vertex shader builds the quad’s corners from the instance’s own fields (see GpuStrip::vertex_range).

Structs§

ClassRun
One run of consecutive instances drawn with one class’s program, as an offset into the slice split_class_runs was handed.
ClassSet
A set of PaintClasses, as a bitmask — which class programs one pass needs, so a frame resolves exactly those pipelines and no others.
GpuStrip
One strip instance, matching the shaders’ StripInstance byte for byte.
StripDraw
The per-draw values every strip instance of one draw shares.

Enums§

PaintClass
Which specialised strip program an instance can be drawn with.
PaintType
How the fragment shader turns an instance’s payload into colour.

Constants§

PAINT_TEXTURE_INDEX_MASK
Mask covering the encoded-paint texel index in GpuStrip::paint_and_rect_flag — everything below the paint type.
RECT_STRIP_FLAG
Bit 31 of GpuStrip::paint_and_rect_flag, marking an instance as a whole rectangle rather than a strip: the shader then reads GpuStrip::dense_width_or_rect_height as a height and GpuStrip::col_idx_or_rect_frac as a coverage fraction.
RUN_SPLIT_MIN
The default split_class_runs threshold: a run of fewer instances than this is not worth a pipeline switch of its own and is drawn with PaintClass::Uber instead.

Functions§

alpha_column
The alpha column the strip shader addresses coverage by, from the byte index a Strip carries.
merge_class_runs
split_class_runs over runs already known to share a class, rather than over the instances themselves — steps 2 and 3 alone.
pack_paint_descriptor
The packed paint descriptor for a paint_type instance whose encoded-paint record starts at texel_index.
split_class_runs
Splits instances — one pass segment, in painter order — into consecutive runs, each drawn with one class’s program, appending them to out.