[Mesa-dev] [PATCH 11/11] egl/wayland: Use linux-dmabuf interface for buffers

Emil Velikov emil.l.velikov at gmail.com
Wed Jul 12 15:10:11 UTC 2017


Hi Dan,

There's one small bug that I've missed previously. Other than that the
patch looks great

On 16 June 2017 at 18:14, Daniel Stone <daniels at collabora.com> wrote:
> When available, use the zwp_linux_dambuf_v1 interface to create buffers,
> which allows multiple planes and buffer modifiers to be used.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---

>     if (dri2_surf->back->dri_image == NULL) {
> -      dri2_surf->back->dri_image =
> -         dri2_dpy->image->createImage(dri2_dpy->dri_screen,
> -                                      dri2_surf->base.Width,
> -                                      dri2_surf->base.Height,
> -                                      dri_image_format,
> -                                      dri2_dpy->is_different_gpu ?
> -                                         0 : use_flags,
> -                                      NULL);
> +      if (num_modifiers && dri2_dpy->image->base.version >= 15 &&
> +          dri2_dpy->image->createImageWithModifiers) {
> +         dri2_surf->back->dri_image =
> +           dri2_dpy->image->createImageWithModifiers(dri2_dpy->dri_screen,
> +                                                     dri2_surf->base.Width,
> +                                                     dri2_surf->base.Height,
> +                                                     dri_image_format,
> +                                                     modifiers,
> +                                                     num_modifiers,
> +                                                     NULL);
> +      } else {
> +         dri2_surf->back->dri_image =
> +            dri2_dpy->image->createImage(dri2_dpy->dri_screen,
I believe we should not fallback to the createImage API if num_modifiers != 0.

-Emil


More information about the mesa-dev mailing list