mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-26 17:58:17 +02:00
gl-renderer: Take direct-display into consideration
The buffer_init function added with commit83b37c0ac4, "renderers: pull dmabuf initial setup out of attach", doesn't take into consideration the the buffer's direct-display property. Previously, gl_renderer_attach_dmabuf, wasn't being called when dmabuf's direct-display was turned on, but with commit83b37c0ac4this has been changed. So with commit83b37c0ac4, linux_dmabuf_buffer_get_user_data will never return a valid gb (gl buffer state), causing a crash using direct-display extension. This adds an explicit check to return early when this happens. Fixes:83b37c0ac4, "renderers: pull dmabuf initial setup out of attach" Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
dae61f3321
commit
bf7b2311e7
1 changed files with 2 additions and 1 deletions
|
|
@ -3617,7 +3617,8 @@ gl_renderer_buffer_init(struct weston_compositor *etc,
|
|||
{
|
||||
struct gl_buffer_state *gb;
|
||||
|
||||
if (buffer->type != WESTON_BUFFER_DMABUF)
|
||||
if (buffer->type != WESTON_BUFFER_DMABUF ||
|
||||
(buffer->type == WESTON_BUFFER_DMABUF && buffer->direct_display))
|
||||
return;
|
||||
|
||||
/* Thanks to linux-dmabuf being totally independent of libweston,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue