render/allocator/gbm: implement begin_data_ptr_access

Allows CPU access of the buffer. Can be useful for multi-GPU copies
via CPU.

Might be quite slow, and might fail for an arbitrary driver-specific
reason, so not advertised in wlr_allocator.buffer_caps.
This commit is contained in:
Simon Ser 2023-10-25 18:06:53 +02:00
parent 47bf87ade2
commit de1bbbb4e2
2 changed files with 43 additions and 0 deletions

View file

@ -12,6 +12,7 @@ struct wlr_gbm_buffer {
struct wl_list link; // wlr_gbm_allocator.buffers
struct gbm_bo *gbm_bo; // NULL if the gbm_device has been destroyed
void *gbm_map_data; // NULL unless we have an active mapping
struct wlr_dmabuf_attributes dmabuf;
};