mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-30 17:38:17 +02:00
renderer-gl: Also set dmabuf.rb when creating render buffer
gl_fbo_image_init() allocates and returns a renderbuffer through its rb argument. If it is not set in the dmabuf.rb field, gl_fbo_fini() will not be able to release it and DMA buffers can start leaking. This is usually not an issue because the DMA buffers are released when Weston closes, but in the case of the pipewire output, the buffers are allocated when a pipewire client connects and freed when the client disconnects. In that situation, dangling DMA buffers can be observed because of the unfreed render buffer (rb). Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
This commit is contained in:
parent
37860bace5
commit
4de2655f08
1 changed files with 1 additions and 0 deletions
|
|
@ -1064,6 +1064,7 @@ gl_renderer_create_renderbuffer_dmabuf(struct weston_output *output,
|
|||
renderbuffer = xzalloc(sizeof(*renderbuffer));
|
||||
|
||||
renderbuffer->dmabuf.gr = gr;
|
||||
renderbuffer->dmabuf.rb = rb;
|
||||
renderbuffer->dmabuf.memory = dmabuf;
|
||||
renderbuffer->dmabuf.image = image;
|
||||
gl_renderbuffer_init(renderbuffer, RENDERBUFFER_DMABUF, fb,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue