wayland::serv..._feedback_v1_t(3)
β¨ NAME β¨
okay so bestie, this is the wayland::server::zwp_linux_dmabuf_feedback_v1_t(3) page from the Wayland++ manual β and it's literally all about dmabuf feedback π
πΈ SYNOPSIS πΈ
#include <wayland-server-protocol-unstable.hpp>
π Public Member Functions π
std::function< void()> & on_destroy ()β destroys the feedback object β¨void done (bool post=true)β all the feedback has been sent, periodtvoid format_table (int fd, uint32_t size, bool post=true)β the format and modifier table πvoid main_device (array_t const &device, bool post=true)β the preferred main device πvoid tranche_done (bool post=true)β a preference tranche has been sent, slayvoid tranche_target_device (array_t const &device, bool post=true)β the target device π¦void tranche_formats (array_t const &indices, bool post=true)β supported buffer format modifier πΈvoid tranche_flags (zwp_linux_dmabuf_feedback_v1_tranche_flags const &flags, bool post=true)β tranche flags βbool proxy_has_object () constβ check whether this wrapper actually wraps an object πvoid post_no_memory () constβ no blurb on this one, it's just here π«Άuint32_t get_id () constβ same, no blurb in the source, just vibes πclient_t get_client () constβ also no blurb, it's giving mysteryunsigned int get_version () constβ no blurb again, sorry bestie πstd::string get_class ()β no blurb, but it's iconic
π Static Public Attributes π
static constexpr std::uint32_t done_since_version = 1β minimum protocol version required for thedonefunction β¨static constexpr std::uint32_t format_table_since_version = 1β minimum protocol version required for theformat_tablefunction πstatic constexpr std::uint32_t main_device_since_version = 1β minimum protocol version required for themain_devicefunction πstatic constexpr std::uint32_t tranche_done_since_version = 1β minimum protocol version required for thetranche_donefunction πΈstatic constexpr std::uint32_t tranche_target_device_since_version = 1β minimum protocol version required for thetranche_target_devicefunction π¦static constexpr std::uint32_t tranche_formats_since_version = 1β minimum protocol version required for thetranche_formatsfunction βstatic constexpr std::uint32_t tranche_flags_since_version = 1β minimum protocol version required for thetranche_flagsfunction π₯
π Detailed Description π
dmabuf feedback β that's the whole vibe π
This object advertises dmabuf parameters feedback, bestie. That includes the preferred devices and the supported formats/modifiers π
The parameters are sent once when this object is created, and again whenever they change. The done event is always sent once after all the parameters have been sent. And when a single parameter changes, all parameters are re-sent by the compositor. no cap, that's the rule π
Compositors can re-send the parameters when the current client buffer allocations are sub-optimal. But β and this is important β compositors should not re-send the parameters if re-allocating the buffers would not result in a more optimal configuration. In particular, compositors should avoid sending the exact same parameters multiple times in a row. like, please don't spam the exact same thing, it's not cute π
Thetranche_target_deviceandtranche_modifierevents are grouped by tranches of preference. For each tranche, atranche_target_device, onetranche_flagsand one or moretranche_modifierevents are sent, followed by atranche_doneevent finishing the list. The tranches are sent in descending order of preference. All formats and modifiers in the same tranche have the same preference. iykyk π«
To send parameters, the compositor sends one main_device event, tranches (each consisting of one tranche_target_device event, one tranche_flags event, tranche_modifier events and then a tranche_done event), then one done event. slay, that's the whole sequence π
Definition at line 2097 of file wayland-server-protocol-unstable.hpp.
π Member Function Documentation π
okay bestie, this is the good part β every single member function, in order, no skips, no cap β¨
done
void zwp_linux_dmabuf_feedback_v1_t::done (bool post = true)
all feedback has been sent β this event fires after all the parameters of a wp_linux_dmabuf_feedback object have been sent π
the whole point is atomicity: it lets changes to the wp_linux_dmabuf_feedback parameters be seen as atomic, even if those changes happen across multiple events. so like, the client gets one clean snapshot instead of a half-updated vibe π
defined at line 5130 of file wayland-server-protocol-unstable.cpp
format_table
void zwp_linux_dmabuf_feedback_v1_t::format_table (int fd, uint32_t size,
bool post = true)
format and modifier table π¦
parameters, iconically:
fdβ table file descriptorsizeβ table size, in bytes
this event hands you a file descriptor which can be memory-mapped to access the format and modifier table, iykyk.
the table contains a tightly packed array of consecutive format + modifier pairs. each pair is 16 bytes wide. it contains a format as a 32-bit unsigned integer, followed by 4 bytes of unused padding, and a modifier as a 64-bit unsigned integer. the native endianness is used β don't come for me about byte order, that's just how it is β¨
the client must map the file descriptor in read-only private mode. periodt.
big warning energy: compositors are not allowed to mutate the table file contents once this event has been sent. instead, compositors must create a new, separate table file and re-send feedback parameters. (they are allowed to store duplicate format + modifier pairs in the table though, so duplicates are lowkey fine π)
defined at line 5135 of file wayland-server-protocol-unstable.cpp
get_class <small>[inherited]</small>
std::string wayland::server::resource_t::get_class ()
Retrieve the interface name (class) of a resource object. π
returns: interface name of the resource object. that's it, that's the whole function, and honestly? slay.
get_client <small>[inherited]</small>
client_t wayland::server::resource_t::get_client () const
Get the associated client π«Ά
returns: the client that owns the resource. main character identification, basically.
get_id <small>[inherited]</small>
uint32_t wayland::server::resource_t::get_id () const
Get the internal ID of the resource π
returns: the internal ID of the resource.
get_version <small>[inherited]</small>
unsigned int wayland::server::resource_t::get_version () const
Get interface version β
returns: interface version this resource has been constructed with.
main_device
void zwp_linux_dmabuf_feedback_v1_t::main_device (array_t const & device,
bool post = true)
preferred main device π
parameter:
deviceβ devicedev_tvalue
okay so this event advertises the main device that the server prefers to use when direct scan-out to the target device isn't possible. the advertised main device may be different for each wp_linux_dmabuf_feedback object, and may change over time π«
there is exactly one main device. the compositor must send at least one preference tranche with tranche_target_device equal to main_device.
clients need to create buffers that the main device can import and read from, otherwise creating the dmabuf wl_buffer will fail (see the wp_linux_buffer_params.create and create_immed requests for details). the main device will also likely be kept active by the compositor, so clients can use it instead of waking up another device for power savings β efficiency, we love her π₯
in general the device is a DRM node. the DRM node type (primary vs. render) is unspecified. clients must not rely on the compositor sending a particular node type. clients cannot check two devices for equality by comparing the dev_t value β nope, do not try it π
if explicit modifiers are not supported and the client performs buffer allocations on a different device than the main device, then the client must force the buffer to have a linear layout. non-negotiable.
defined at line 5140 of file wayland-server-protocol-unstable.cpp
on_destroy
std::function< void()> & zwp_linux_dmabuf_feedback_v1_t::on_destroy ()
destroy the feedback object πΈ β using this request a client can tell the server that it is not going to use the wp_linux_dmabuf_feedback object anymore. it's giving closure.
defined at line 5124 of file wayland-server-protocol-unstable.cpp
post_no_memory <small>[inherited]</small>
void wayland::server::resource_t::post_no_memory () const
Post "not enough memory" error to the client π
if the compositor has not enough memory to fulfill a certain request of the client, this function can be called to notify the client of this circumstance. it's the "bestie i'm broke" of syscalls.
proxy_has_object <small>[inherited]</small>
bool wayland::server::resource_t::proxy_has_object () const
Check whether this wrapper actually wraps an object. π¦
returns: true if there is an underlying object, false if this wrapper is empty. vibe check for wrappers.
tranche_done
void zwp_linux_dmabuf_feedback_v1_t::tranche_done (bool post = true)
a preference tranche has been sent β¨ β this event splits tranche_target_device and tranche_modifier events into preference tranches. it is sent after a set of tranche_target_device and tranche_modifier events; it represents the end of a tranche. the next tranche will have a lower preference. so like, ranking order, most-favoured first π
defined at line 5145 of file wayland-server-protocol-unstable.cpp
tranche_flags
void zwp_linux_dmabuf_feedback_v1_t::tranche_flags
(zwp_linux_dmabuf_feedback_v1_tranche_flags const & flags, bool post =
true)
tranche flags π
parameter:
flagsβ tranche flags
this event sets tranche-specific flags.
the scanout flag is a hint that direct scan-out may be attempted by the compositor on the target device if the client appropriately allocates a buffer. how to allocate a buffer that can be scanned out on the target device is implementation-defined β so no, there's no universal recipe, sorry babe π
this event is tied to a preference tranche, see the tranche_done event.
defined at line 5160 of file wayland-server-protocol-unstable.cpp
tranche_formats
void zwp_linux_dmabuf_feedback_v1_t::tranche_formats (array_t const &
indices, bool post = true)
supported buffer format modifier π
parameter:
indicesβ array of 16-bit indexes
this event advertises the format + modifier combinations that the compositor supports. ate.
it carries an array of indices, each referring to a format + modifier pair in the last received format table (see the format_table event). each index is a 16-bit unsigned integer in native endianness.
for legacy support, DRM_FORMAT_MOD_INVALID is an allowed modifier. it indicates that the server can support the format with an implicit modifier. when a buffer has DRM_FORMAT_MOD_INVALID as its modifier, it is as if no explicit modifier is specified. the effective modifier will be derived from the dmabuf.
a compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for a given format supports both explicit modifiers and implicit modifiers.
rule: compositors must not send duplicate format + modifier pairs within the same tranche or across two different tranches with the same target device and flags. just don't π
this event is tied to a preference tranche, see the tranche_done event.
for the definition of the format and modifier codes, see the wp_linux_buffer_params.create request.
defined at line 5155 of file wayland-server-protocol-unstable.cpp
tranche_target_device
void zwp_linux_dmabuf_feedback_v1_t::tranche_target_device (array_t const &
device, bool post = true)
target device π¦
parameter:
deviceβ devicedev_tvalue
this event advertises the target device that the server prefers to use for a buffer created given this tranche. the advertised target device may be different for each preference tranche, and may change over time β she's fluid like that β¨
there is exactly one target device per tranche.
the target device may be a scan-out device, for example if the compositor prefers to directly scan-out a buffer created given this tranche. the target device may be a rendering device, for example if the compositor prefers to texture from said buffer.
the client can use this hint to allocate the buffer in a way that makes it accessible from the target device, ideally directly. the buffer must still be accessible from the main device, either through direct import or through a potentially more expensive fallback path. if the buffer can't be directly imported from the main device then clients must be prepared for the compositor changing the tranche priority or making wl_buffer creation fail (see the wp_linux_buffer_params.create and create_immed requests for details). so like, always have a plan b π
if the device is a DRM node, the DRM node type (primary vs. render) is unspecified. clients must not rely on the compositor sending a particular node type. clients cannot check two devices for equality by comparing the dev_t value.
this event is tied to a preference tranche, see the tranche_done event.
defined at line 5150 of file wayland-server-protocol-unstable.cpp
π Member Data Documentation π
all of these are std::uint32_t, all [static], all [constexpr], and every single one of them equals 1 β consistency is iconic π
wayland::server::zwp_linux_dmabuf_feedback_v1_t::done_since_version = 1β minimum protocol version required for thedonefunction. defined at line 2144 of filewayland-server-protocol-unstable.hpp.wayland::server::zwp_linux_dmabuf_feedback_v1_t::format_table_since_version = 1β minimum protocol version required for theformat_tablefunction. defined at line 2170 of filewayland-server-protocol-unstable.hpp.wayland::server::zwp_linux_dmabuf_feedback_v1_t::main_device_since_version = 1β minimum protocol version required for themain_devicefunction. defined at line 2204 of filewayland-server-protocol-unstable.hpp.wayland::server::zwp_linux_dmabuf_feedback_v1_t::tranche_done_since_version = 1β minimum protocol version required for thetranche_donefunction. defined at line 2218 of filewayland-server-protocol-unstable.hpp.wayland::server::zwp_linux_dmabuf_feedback_v1_t::tranche_flags_since_version = 1β minimum protocol version required for thetranche_flagsfunction. defined at line 2309 of filewayland-server-protocol-unstable.hpp.wayland::server::zwp_linux_dmabuf_feedback_v1_t::tranche_formats_since_version = 1β minimum protocol version required for thetranche_formatsfunction. defined at line 2290 of filewayland-server-protocol-unstable.hpp.wayland::server::zwp_linux_dmabuf_feedback_v1_t::tranche_target_device_since_version = 1β minimum protocol version required for thetranche_target_devicefunction. defined at line 2255 of filewayland-server-protocol-unstable.hpp.
π«Ά Author π«Ά
generated automatically by Doxygen for Wayland++ from the source code. not a human, not a vibe, just a robot doing its best π§
and that's the whole page bestie, you made it to the end π this was Version 1.0.1, dated Fri Mar 27 2026 β go forth and allocate those buffers responsibly, mwah ππ β¨
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms