aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render/allocator.h
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-11-24 21:42:08 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-11-26 16:40:53 +0000
commit83d78f9fd415a1110e888b3c5f9cc9fb79627217 (patch)
tree5e857f7ae986b99aa8d086f393e12a70cff6457b /include/wlr/render/allocator.h
parentef1669d33e15134e09d30c6989d53773629fd9ba (diff)
render: add DMA-BUF docs
Document some of the assumptions for DMA-BUF buffer sharing and modifiers.
Diffstat (limited to 'include/wlr/render/allocator.h')
-rw-r--r--include/wlr/render/allocator.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/wlr/render/allocator.h b/include/wlr/render/allocator.h
index 3caeffa0..3150e36c 100644
--- a/include/wlr/render/allocator.h
+++ b/include/wlr/render/allocator.h
@@ -51,6 +51,18 @@ void wlr_allocator_destroy(struct wlr_allocator *alloc);
*
* When the caller is done with it, they must unreference it by calling
* wlr_buffer_drop.
+ *
+ * The `format` passed in indicates the format to use and the list of
+ * acceptable modifiers. The order in which modifiers are listed is not
+ * significant.
+ *
+ * When running with legacy drivers which don't support explicit modifiers, the
+ * allocator must recognize two modifiers: INVALID (for implicit tiling and/or
+ * compression) and LINEAR.
+ *
+ * The allocator must return a buffer using one of the modifiers listed. In
+ * particular, allocators must not return a buffer with an implicit modifier
+ * unless the user has allowed it by passing INVALID in the modifier list.
*/
struct wlr_buffer *wlr_allocator_create_buffer(struct wlr_allocator *alloc,
int width, int height, const struct wlr_drm_format *format);