mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
linux_dmabuf_v1: Implement data_ptr_access
Allow direct access to the pixel data of linux_dmabuf_v1 buffers by
mmapping the FD. This causes a wait on any outstanding fences and also
triggers the DMA_BUF_SYNC mechanism to do any cache fiddling needed.
This doesn't support multi-planar formats (e.g. YUV420 from hardware
codecs)
I also fix the comment on wlr_renderer.render_buffer_caps (it's used for
textures, not the render target) and update
wlr_renderer_init_wl_display() and
wlr_linux_dmabuf_feedback_v1_init_with_options() to use the renderer's
own claimed buffer_caps instead of hardcoding DMABUF as required.
Loosely based on 46ef2cfa3c
This commit is contained in:
parent
af43d3b9e7
commit
27bbb91abf
5 changed files with 120 additions and 4 deletions
|
|
@ -84,7 +84,7 @@ bool wlr_renderer_init_wl_display(struct wlr_renderer *r,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (wlr_renderer_get_texture_formats(r, WLR_BUFFER_CAP_DMABUF) != NULL &&
|
||||
if (wlr_renderer_get_texture_formats(r, r->render_buffer_caps) != NULL &&
|
||||
wlr_renderer_get_drm_fd(r) >= 0 &&
|
||||
wlr_linux_dmabuf_v1_create_with_renderer(wl_display, 4, r) == NULL) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue