[PATCH xserver 2/5] xwayland: "EGL_EXT_device_base" required for EGLStream
eglQueryDevicesEXT() would abort if the required extensions are not available, meaning that enabling “-eglstream” on a non-EGLStream capable hardware would lead to an abort(). Check that "EGL_EXT_device_base" extension is available and bail out early if not, so we don't abort() later in eglQueryDevicesEXT(). Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov --- hw/xwayland/xwayland-glamor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index cdca072ed..f543f321d 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -67,6 +67,9 @@ xwl_glamor_egl_get_devices(int *num_devices) int drm_dev_count = 0; int i; +if (!xwl_glamor_egl_supports_device_probing()) +return NULL; + /* Get the number of devices */ ret = eglQueryDevicesEXT(0, NULL, num_devices); if (!ret || *num_devices < 1) -- 2.17.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/5] xwayland: "EGL_EXT_device_base" required for eglstream
Reviewed-by: Lyude PaulOn Thu, 2018-05-24 at 16:11 +0200, Olivier Fourdan wrote: > eglQueryDevicesEXT() would abort if the required extenon are not > available, meaning that enabling “-eglstream”on a non-EGL stream capable > hardware would lead to an abort(). > > Check that "EGL_EXT_device_base" extension is available and baild out > early if not, so we don't abort() later. > > Signed-off-by: Olivier Fourdan > --- > hw/xwayland/xwayland-glamor.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c > index cdca072ed..f543f321d 100644 > --- a/hw/xwayland/xwayland-glamor.c > +++ b/hw/xwayland/xwayland-glamor.c > @@ -67,6 +67,9 @@ xwl_glamor_egl_get_devices(int *num_devices) > int drm_dev_count = 0; > int i; > > +if (!xwl_glamor_egl_supports_device_probing()) > +return NULL; > + > /* Get the number of devices */ > ret = eglQueryDevicesEXT(0, NULL, num_devices); > if (!ret || *num_devices < 1) -- Cheers, Lyude Paul ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/5] xwayland: "EGL_EXT_device_base" required for eglstream
eglQueryDevicesEXT() would abort if the required extenon are not available, meaning that enabling “-eglstream”on a non-EGL stream capable hardware would lead to an abort(). Check that "EGL_EXT_device_base" extension is available and baild out early if not, so we don't abort() later. Signed-off-by: Olivier Fourdan--- hw/xwayland/xwayland-glamor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index cdca072ed..f543f321d 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -67,6 +67,9 @@ xwl_glamor_egl_get_devices(int *num_devices) int drm_dev_count = 0; int i; +if (!xwl_glamor_egl_supports_device_probing()) +return NULL; + /* Get the number of devices */ ret = eglQueryDevicesEXT(0, NULL, num_devices); if (!ret || *num_devices < 1) -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel