mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render: add DMA-BUF docs
Document some of the assumptions for DMA-BUF buffer sharing and modifiers.
This commit is contained in:
parent
ef1669d33e
commit
83d78f9fd4
3 changed files with 50 additions and 4 deletions
|
|
@ -5,7 +5,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/** A single DRM format */
|
||||
/** A single DRM format, with a set of modifiers attached. */
|
||||
struct wlr_drm_format {
|
||||
// The actual DRM format, from `drm_fourcc.h`
|
||||
uint32_t format;
|
||||
|
|
@ -17,7 +17,24 @@ struct wlr_drm_format {
|
|||
uint64_t modifiers[];
|
||||
};
|
||||
|
||||
/** A set of DRM formats */
|
||||
/**
|
||||
* A set of DRM formats and modifiers.
|
||||
*
|
||||
* This is used to describe the supported format + modifier combinations. For
|
||||
* instance, backends will report the set they can display, and renderers will
|
||||
* report the set they can render to. For a more general overview of formats
|
||||
* and modifiers, see:
|
||||
* https://lore.kernel.org/dri-devel/20210905122742.86029-1-daniels@collabora.com/
|
||||
*
|
||||
* For compatibility with legacy drivers which don't support explicit
|
||||
* modifiers, the special modifier DRM_FORMAT_MOD_INVALID is used to indicate
|
||||
* that implicit modifiers are supported. Legacy drivers can also support the
|
||||
* DRM_FORMAT_MOD_LINEAR modifier, which forces the buffer to have a linear
|
||||
* layout.
|
||||
*
|
||||
* Users must not assume that implicit modifiers are supported unless INVALID
|
||||
* is listed in the modifier list.
|
||||
*/
|
||||
struct wlr_drm_format_set {
|
||||
// The number of formats
|
||||
size_t len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue