[Mesa-dev] [PATCH v2] egl/x11_dri3: stop restricting support to render nodes unnecessarily

Axel Davy axel.davy at ens.fr
Fri Jun 10 19:28:09 UTC 2016


Hi,

Reading the mailing list about that issue, I get the following remarks:

. WL_bind_wayland_display support is advertised for dri3, but contrary 
to all other
advertisers, it doesn't implement the authenticate function. It seems wrong,
and it should do like wayland, where on render nodes it prints a warning 
and returns.

. Render-node support becoming quite common, why not just disable the 
extension
why they are not available, instead of reverting to the dri2 backend ?
It seems to me this would solve the problem that the current patch 
proposal wants to solve.

. If one wants to be perfectionnist, in case render nodes are not 
available, but dri2 is, dri3 could still be used,
while a dri2 context would be initialised, just to handle the 
authentication.


The proposed patch however doesn't seem very satisfying to me. For the 
proposed behaviour, a configure option seems more adapted than a hack 
based on whether wayland support is built. I favor however just not 
advertising the extension when render-nodes aren't available (+ add a 
noop authenticate with warning to have that extension properly implemented).


Yours,

Axel Davy

On 10/06/2016 18:35, Frank Binns wrote:
> In order to support the WL_bind_wayland_display extension it's necessary to
> make use of render nodes, as DRI3 doesn't provide a mechanism for authenticating
> client opened device node fds. However, this doesn't apply when Wayland support
> is disabled, since the extension is no longer exposed.
>
> Changes since v1:
> - Make HAVE_WAYLAND_PLATFORM less inclusive (Martin Peres)
> - Enhance DRI3 disabled warning (Martin Peres)
> - Update commit message
>
> Signed-off-by: Frank Binns <frank.binns at imgtec.com>
> ---
>   src/egl/drivers/dri2/platform_x11_dri3.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
> index 9363a8a..6c05956 100644
> --- a/src/egl/drivers/dri2/platform_x11_dri3.c
> +++ b/src/egl/drivers/dri2/platform_x11_dri3.c
> @@ -451,10 +451,13 @@ dri3_get_device_name(int fd)
>       * support, fall back to dri2. User can override it with environment
>       * variable if they don't need to use that extension.
>       */
> +#ifdef HAVE_WAYLAND_PLATFORM
>      if (getenv("EGL_FORCE_DRI3") == NULL) {
>         _eglLog(_EGL_WARNING, "Render node support not available, falling back to dri2");
>         _eglLog(_EGL_WARNING, "If you want to force dri3, set EGL_FORCE_DRI3 environment variable");
> +      _eglLog(_EGL_WARNING, "Alternatively, you can rebuild Mesa without Wayland support");
>      } else
> +#endif
>         ret = loader_get_device_name_for_fd(fd);
>   
>      return ret;




More information about the mesa-dev mailing list