Every native platform now runs on the HAL (makepad-hal) alone: macOS and iOS/tvOS on Metal, Windows on D3D11 (with device-loss recovery), Linux on Vulkan (X11, Wayland and direct KMS, multi-GPU laptops with per-output modes, mirror/extended arrangements and pacing) plus a GLES backend, and Android on Vulkan with media, camera, network, haptics and file access on the HAL. The old per-OS backends, the hal cfg and OpenHarmony are gone. GPU memory: the HAL reads the device budget, keeps a UI reserve and raises GpuPressure; failed allocations wait for room. One font service per host, a frame profiler, held events for hidden views, automation for tests. Our own generated Vulkan, Wayland and Windows bindings replace vendored ones. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
179 lines
7.7 KiB
XML
179 lines
7.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<protocol name="linux_dmabuf_v1">
|
|
|
|
<copyright>
|
|
Copyright © 2014, 2015 Collabora, Ltd.
|
|
Copyright © 2023 Simon Ser
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
copy of this software and associated documentation files (the "Software"),
|
|
to deal in the Software without restriction, including without limitation
|
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
and/or sell copies of the Software, and to permit persons to whom the
|
|
Software is furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice (including the next
|
|
paragraph) shall be included in all copies or substantial portions of the
|
|
Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
DEALINGS IN THE SOFTWARE.
|
|
</copyright>
|
|
|
|
<interface name="zwp_linux_dmabuf_v1" version="4">
|
|
<description summary="factory for creating dmabuf-based wl_buffers">
|
|
Following the interfaces from:
|
|
https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
|
|
This interface offers ways to create generic dmabuf-based wl_buffers.
|
|
</description>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="unbind the factory"/>
|
|
</request>
|
|
|
|
<request name="create_params">
|
|
<description summary="create a temporary object for buffer parameters"/>
|
|
<arg name="params_id" type="new_id" interface="zwp_linux_buffer_params_v1"/>
|
|
</request>
|
|
|
|
<event name="format">
|
|
<description summary="supported buffer format"/>
|
|
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
|
|
</event>
|
|
|
|
<event name="modifier" since="3">
|
|
<description summary="supported buffer format modifier"/>
|
|
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
|
|
<arg name="modifier_hi" type="uint" summary="high 32 bits of layout modifier"/>
|
|
<arg name="modifier_lo" type="uint" summary="low 32 bits of layout modifier"/>
|
|
</event>
|
|
|
|
<request name="get_default_feedback" since="4">
|
|
<description summary="get default feedback"/>
|
|
<arg name="id" type="new_id" interface="zwp_linux_dmabuf_feedback_v1"/>
|
|
</request>
|
|
|
|
<request name="get_surface_feedback" since="4">
|
|
<description summary="get feedback for a surface"/>
|
|
<arg name="id" type="new_id" interface="zwp_linux_dmabuf_feedback_v1"/>
|
|
<arg name="surface" type="object" interface="wl_surface"/>
|
|
</request>
|
|
</interface>
|
|
|
|
<interface name="zwp_linux_buffer_params_v1" version="4">
|
|
<description summary="parameters for creating a dmabuf-based wl_buffer">
|
|
This temporary object is a collection of dmabufs and other
|
|
parameters that together form a single logical buffer.
|
|
</description>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="delete this object, used or not"/>
|
|
</request>
|
|
|
|
<enum name="error">
|
|
<entry name="already_used" value="0" summary="the dmabuf_batch object has already been used to create a wl_buffer"/>
|
|
<entry name="plane_idx" value="1" summary="plane index out of bounds"/>
|
|
<entry name="plane_set" value="2" summary="the plane index was already set"/>
|
|
<entry name="incomplete" value="3" summary="missing or too many planes to create a buffer"/>
|
|
<entry name="invalid_format" value="4" summary="format not supported"/>
|
|
<entry name="invalid_dimensions" value="5" summary="invalid width or height"/>
|
|
<entry name="out_of_bounds" value="6" summary="offset + stride * height goes out of dmabuf bounds"/>
|
|
<entry name="invalid_wl_buffer" value="7" summary="invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params"/>
|
|
</enum>
|
|
|
|
<request name="add">
|
|
<description summary="add a dmabuf to the temporary set"/>
|
|
<arg name="fd" type="fd" summary="dmabuf fd"/>
|
|
<arg name="plane_idx" type="uint" summary="plane index"/>
|
|
<arg name="offset" type="uint" summary="offset in bytes"/>
|
|
<arg name="stride" type="uint" summary="stride in bytes"/>
|
|
<arg name="modifier_hi" type="uint" summary="high 32 bits of layout modifier"/>
|
|
<arg name="modifier_lo" type="uint" summary="low 32 bits of layout modifier"/>
|
|
</request>
|
|
|
|
<enum name="flags" bitfield="true">
|
|
<entry name="y_invert" value="1" summary="contents are y-inverted"/>
|
|
<entry name="interlaced" value="2" summary="content is interlaced"/>
|
|
<entry name="bottom_first" value="4" summary="bottom field first"/>
|
|
</enum>
|
|
|
|
<request name="create">
|
|
<description summary="create a wl_buffer from the given dmabufs"/>
|
|
<arg name="width" type="int" summary="base plane width in pixels"/>
|
|
<arg name="height" type="int" summary="base plane height in pixels"/>
|
|
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
|
|
<arg name="flags" type="uint" enum="flags" summary="see enum flags"/>
|
|
</request>
|
|
|
|
<event name="created">
|
|
<description summary="buffer creation succeeded"/>
|
|
<arg name="buffer" type="new_id" interface="wl_buffer" summary="the newly created wl_buffer"/>
|
|
</event>
|
|
|
|
<event name="failed">
|
|
<description summary="buffer creation failed"/>
|
|
</event>
|
|
|
|
<request name="create_immed" since="2">
|
|
<description summary="immediately create a wl_buffer from the given dmabufs"/>
|
|
<arg name="buffer_id" type="new_id" interface="wl_buffer" summary="id for the newly created wl_buffer"/>
|
|
<arg name="width" type="int" summary="base plane width in pixels"/>
|
|
<arg name="height" type="int" summary="base plane height in pixels"/>
|
|
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
|
|
<arg name="flags" type="uint" enum="flags" summary="see enum flags"/>
|
|
</request>
|
|
</interface>
|
|
|
|
<interface name="zwp_linux_dmabuf_feedback_v1" version="4">
|
|
<description summary="dmabuf feedback">
|
|
This object advertises dmabuf parameters feedback.
|
|
</description>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="destroy the feedback object"/>
|
|
</request>
|
|
|
|
<event name="done">
|
|
<description summary="all feedback has been sent"/>
|
|
</event>
|
|
|
|
<event name="format_table">
|
|
<description summary="format and modifier table"/>
|
|
<arg name="fd" type="fd" summary="table file descriptor"/>
|
|
<arg name="size" type="uint" summary="table size, in bytes"/>
|
|
</event>
|
|
|
|
<event name="main_device">
|
|
<description summary="preferred main device"/>
|
|
<arg name="device" type="array" summary="device dev_t value"/>
|
|
</event>
|
|
|
|
<event name="tranche_done">
|
|
<description summary="a preference tranche has been sent"/>
|
|
</event>
|
|
|
|
<event name="tranche_target_device">
|
|
<description summary="target device"/>
|
|
<arg name="device" type="array" summary="device dev_t value"/>
|
|
</event>
|
|
|
|
<event name="tranche_formats">
|
|
<description summary="supported buffer format modifier"/>
|
|
<arg name="indices" type="array" summary="array of 16-bit indexes"/>
|
|
</event>
|
|
|
|
<enum name="tranche_flags" bitfield="true">
|
|
<entry name="scanout" value="1" summary="direct scan-out tranche"/>
|
|
</enum>
|
|
|
|
<event name="tranche_flags">
|
|
<description summary="tranche flags"/>
|
|
<arg name="flags" type="uint" enum="tranche_flags" summary="tranche flags"/>
|
|
</event>
|
|
</interface>
|
|
</protocol>
|