[PATCH weston 3/9] gl-renderer: allow importing dmabufs with format modifiers
Daniel Stone
daniel at fooishbar.org
Mon Nov 21 20:13:37 UTC 2016
Hi Varad,
On 17 November 2016 at 11:55, Varad Gautam <varadgautam at gmail.com> wrote:
> attribs[atti++] = EGL_NONE;
> @@ -1924,9 +1941,10 @@ gl_renderer_import_dmabuf(struct weston_compositor *ec,
> assert(gr->has_dmabuf_import);
>
> for (i = 0; i < dmabuf->attributes.n_planes; i++) {
> - /* EGL import does not have modifiers */
> + /* return if EGL doesn't support import modifiers */
> if (dmabuf->attributes.modifier[i] != 0)
> - return false;
> + if (!gr->has_dmabuf_import_modifiers)
> + return false;
Given the discussion which only kicked off on dri-devel@ when this
extension landed, please also fail the import if modifier[i] !=
modifier[0], i.e. ensure that the modifier passed is the same for all
planes.
Cheers,
Daniel
More information about the wayland-devel
mailing list