Skip to main content

Module gpu

Module gpu 

Source
Expand description

The GPU presenter: each monitor’s frame lives on the GPU as an index texture (one byte per pixel) with its 256-entry palette, and one full-screen triangle looks each pixel up. Only the rectangles the compositor reports are uploaded per frame.

The lookup is exact: no filtering, no blending, and an 8-bit non-sRGB target, so every pixel on screen has the bytes the still PNG has.

Structs§

Canvas
One monitor’s frame on the GPU.
Gpu
The device and the one pipeline per target format.

Functions§

exact_format
An 8-bit format whose stored bytes equal the shader’s output bytes.
merge_spans
Joins rectangles that sit side by side on the same rows (particles in one cell row), so a frame needs fewer copies.