[Mesa-dev] [RFC] DRI3 support for EGL (v2)

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 28 05:47:23 PDT 2015


Hello Boyan,

On 21 July 2015 at 16:43, Boyan Ding <boyan.j.ding at gmail.com> wrote:
> This is the second version of my effort to bring dri3 to EGL on X. This
> time I took Emil's advice and moved common logic of GLX and EGL into
> loader/loader_dri3_helper.[ch]. With this, the dri3 code in libEGL is
> only ~650 lines, with a bunch of trivial code, and glx/dri3 code also
> shrinks a lot.
>
I did not expect that you'll get to reshuffling things before egl/dri3
lands. Thank you !

> I also did some changes on the EGL side since the first version,
> including WL_bind_display correction, support for eglCopyBuffers and
> KHR_image_pixmap, and other corrections elsewhere.
>
> DRI3 support is enabled by default in this series, except when
> LIBGL_DRI3_DISABLE environment variable is set. However, on older
> systems without render-node support in kernel or libdrm, it will
> fall back to dri2 by default to avoid regression in WL_bind_display.
>
> The patches in the series are as follows:
> [PATCH RFC 1/9] loader: Add dri3 helper
> [PATCH RFC 2/9] glx/dri3: Convert to use dri3 helper in loader library
>
> These two patches moves common logic that can be shared with EGL into
> a helper library in src/loader directory.
>
> [PATCH 3/9] egl_dri2: Move filling context_attrib array in a separate
> function
> [PATCH 4/9] egl_dri2: Use createContextAttribs if swrast version >= 3
> [PATCH 5/9] egl_dri2: Add support for EGL_KHR_create_contest when using
> swrast
>
> These three patches are resend of [1]. Patch 3 is a cleanup needed for
> supporting KHR_create_context with different DRI extensions. Patches 4
> and 5 add KHR_create_context support for swrast, which is quite
> trivial. I think these three can land ahead of others if they get
> reviews.
>
Fully agree here.

> [PATCH RFC 6/9] egl_dri2: Add a function to let platform code return
> dri drawable from _EGLSurface
>
> This is what's missing in the first version. I introduced a new kind of
> _EGLSurface implementation in dri2 driver so the common code must be
> aware of this. The first version just accidentally worked without this.
>
> [PATCH RFC 7/9] egl/x11: Implement dri3 support with loader's dri3
> helper
>
> This introduces dri3 to EGL on X11 for real.
>
> [PATCH RFC 8/9] loader/dri3: Expose function to create __DRIimage from
> pixmap
> [PATCH RFC 9/9] egl/x11_dri3: Implement EGL_KHR_image_pixmap
>
> These two adds support for EGL_KHR_image_pixmap. KDE 5 compositing on
> EGL backend now works with these patches.
>
> Piglit shows no regression except gl-1.0-swapbuffers-behavior which is
> the problem of dri3. Tests, comments and suggestions are appreciated.
>
DRI3 is not my strongest point, so it'll be great if we can get more
people looking this way.
I will give it a closer look as time permits (ideally by the end of the week).

Thanks again for tackling this.
Emil


More information about the mesa-dev mailing list