On 15 December 2017 at 17:19, Philipp Zabel <p.za...@pengutronix.de> wrote: > On Fri, 2017-12-15 at 10:51 +0000, Daniel Stone wrote: >> Hi Philipp, >> >> On 15 December 2017 at 10:46, Philipp Zabel <p.za...@pengutronix.de> wrote: >> > On Fri, 2017-12-15 at 09:46 +0000, Daniel Stone wrote: >> > > On 15 December 2017 at 09:25, Philipp Zabel <p.za...@pengutronix.de> >> > > wrote: >> > > > Send format events instead of the modifier event, if the client binds >> > > > on >> > > > a protocol version before version 3, skipping formats that only support >> > > > non-linear modifiers. >> > > >> > > Thanks for this! Could I please persuade you to take on one additional >> > > change though? >> > > >> > > Specifically, if has_dmabuf_import_modifiers is not supported, >> > > gl-renderer will return 0 for num_formats. In this case, it seems like >> > > we should send a conservative list: ARGB8888, XRGB8888, and maybe >> > > speculatively the YUV formats we have hardcoded conversions for >> > > (provided we have R8/RG8 support, cf. the patches from Arnaud). >> > >> > Should we modify gl_renderer_query_dmabuf_formats to return that list of >> > hardcoded formats if has_dmabuf_import_modifiers is not supported? >> >> That was exactly what I had in mind. >> >> Cheers, >> Daniel >> _______________________________________________ >> wayland-devel mailing list >> wayland-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/wayland-devel > > I haven't tested this yet with has_dmabuf_import_modifiers disabled, but > looking at this, I wonder whether this is the right thing to do. > > If has_dmabuf_import_modifiers is set and the driver reports R8/RG88 in > query_dmabuf_formats, shouldn't we add the YUV formats as well? > > ----------8<---------- > gl-renderer: return conservative format list if dmabuf import modifiers > unsupported > > If the EGL_EXT_image_dma_buf_import_modifiers extension is not > supported, let gl_renderer_query_dmabuf_formats return a hardcoded > fallback list. That list contains ARGB8888, XRGB8888, and if the > GL_EXT_texture_rg extension is supported, YUYV, NV12, YUV420, and > YUV444. > > Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> > > diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c > index abf556f0..ee31a86d 100644 > --- a/libweston/gl-renderer.c > +++ b/libweston/gl-renderer.c > @@ -2088,14 +2088,23 @@ gl_renderer_query_dmabuf_formats(struct > weston_compositor *wc, > int **formats, int *num_formats) > { > struct gl_renderer *gr = get_renderer(wc); > + int fallback_formats[] = { Nit: static const int ...
With that patch is Reviewed-by: Emil Velikov <emli.veli...@collabora.com> -Emil _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel