linux-dmabuf: add wp_linux_dmabuf_feedback

Simon Ser requested to merge emersion/wayland-protocols:dmabuf-hints into main

On multi-GPU setups, multiple devices can be used for rendering. Clients need hints about the device in use by the compositor. For instance, if they render on another GPU, then they need to make sure the memory is accessible between devices and that their buffers are not placed in hidden memory.

This commit introduces a new wp_linux_dmabuf_hints object. This object advertises a preferred device via a file descriptor and a set of preferred formats/modifiers.

Each object is bound to a wl_surface and can dynamically update its hints. This enables fine-grained per-surface optimizations. For instance, when a surface is scanned out on a GPU the compositor isn't compositing with, the target device can be set to this GPU to avoid unnecessary roundtrips.

A hint object can also be standalone for clients that don't support per-surface hints.

Signed-off-by: Simon Ser

Closes: wayland#59 (moved)

Edited by Simon Ser

Merge request reports