Documentation
¶
Overview ¶
Package dmabufprobe picks the DRM modifier a screencopy into GPU memory uses: the modifiers the compositor imports, ordered against the ones the device renders and exports, tried one at a time until a buffer allocates, imports and takes a frame. The ScreenCast portal and the recorder both allocate this way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoLayout = errors.New("dmabufprobe: the compositor and the device share no modifier")
ErrNoLayout is a probe that found no modifier to try.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
Layout is one modifier to probe and how its buffers are allocated: for rendering into, when the device renders the modifier, or only for transfer and sampling, when it only exports it (linear on NVIDIA).
func First ¶
First tries layouts in order, one at a time, and returns the first one try accepts with its result. One at a time, because a compositor may advertise a tiling it then fails to import (sway's Vulkan renderer on NVIDIA), and a set would leave the pick to the driver. Declining every layout names why each one failed.