[PATCH weston] gl-renderer: Ignore INVALID modifier

Arnaud Vrac rawoul at gmail.com
Thu Nov 16 18:08:15 UTC 2017


Hi all,

this patch prevents weston from importing dmabuf buffer when the
EGL_EXT_image_dma_buf_import_modifiers extension is not supported. In this
case, the import will either fail in import_simple_dmabuf if the modifier
is zero, or in gl_renderer_import_dmabuf is the modifier is
DRM_FORMAT_MOD_INVALID.

Aren't both of those use cases valid ?

Thanks,
-Arnaud

On Thu, Oct 5, 2017 at 11:37 AM Daniel Stone <daniel at fooishbar.org> wrote:

> On 5 October 2017 at 08:15, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > On Wed,  4 Oct 2017 18:35:45 +0100
> > Daniel Stone <daniels at collabora.com> wrote:
> >> If the user has passed an INVALID modifier, it's because there is no
> >> applicable modifier, and the buffer layout should be determined by a
> >> magic side-channel call (e.g. bo_get_tiling). If the modifier is
> >> INVALID, don't try to pass it through to EGL, but just drop it.
> >>
> >> On the other hand, if a modifier _is_ explicitly specified and we don't
> >> have the modifiers extension, then refuse to import the buffer.
> >
> > gl_renderer_import_dmabuf() guarantees that all modifiers are equal,
> > hence checking only one is enough.
> >
> > Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Thanks Pekka! Pushed now.
>
> Cheers,
> Daniel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20171116/a7f97b20/attachment.html>


More information about the wayland-devel mailing list