[Mesa-dev] [PATCH] [RFC] mesa: propose simple EGL_MESA_image_dma_buf_export

Dave Airlie airlied at gmail.com
Wed Jan 28 19:15:38 PST 2015


(oops pushed send too quick)
> So there is resistance to a query API upstream in the KHR area, at
> least according
> to https://www.khronos.org/registry/egl/extensions/MESA/EGL_MESA_drm_image.txt
> which I based this on.
>
> So I'm wondering how would this API look if we are going to pass back
> multiple fd, pitches, offsets etc to mirror the other API.
>
> eglExportImageQueryMesa(EGLDisplay dpy, EGLImageKHR image, int
> *num_planes, int *fourcc);
> then the original interface can return 3 fds, 3 planes and 3 offsets
>

EGLBoolean eglExportDMABUFImageMESA(EGLDisplay dpy,
                                       EGLImageKHR image,
                                       int *fds,
                                       EGLint *strides, EGLInt *offsets);

I guess it needs to be in two passes or we need to return structs
and have the user free them, which doesn't seem like an EGL API to me.

This way we do the query, allocate things if more planes, then gets
the values back.

Any opinions, sorry for dropping the ball for so long.

Dave.


More information about the mesa-dev mailing list