[PATCH v2 xserver 4/5] xwayland: Do not disable glamor if eglstream failed

2018-05-24 Thread Olivier Fourdan
EGL stream requires glamor, but the opposite is not true. So if someone passes "-eglstream" with a GPU which does not support EGL stream, we could maybe still try GBM and be lucky. That allows Wayland compositor to pass "eglstream" regardless of the actual hardware, if they want to enable EGL stre

[PATCH xserver 0/5] Xwayland fixes wrt eglstream support

2018-05-24 Thread Olivier Fourdan
Hi, To activate EGL support in Xwayland, one needs to pass “-eglstream” to the Xwayland command line. As Xwayland is automatically started by the Wayland compositors (gnome-shell/mutter, weston, etc.), this needs to be added in the compositor. However, if the Xwayland was not built with eglstrea

[PATCH xserver 1/5] xwayland: Allow "-eglstream" option

2018-05-24 Thread Olivier Fourdan
The command line option "-eglstream" used to enable EGLi stream support for NVidia GPU was made available only when Xwayland was built with EGL stream support enabled. Wayland compositors who spawn Xwayland have no easy way to tell whether or not Xwayland was built with EGL stream support enabled,

[PATCH xserver 4/5] xwayland: Do not disable glamor if eglstream failed

2018-05-24 Thread Olivier Fourdan
EGL stream requires glamor, but the opposite is not true. So if someone passes "-eglstream" with a GPU which does not support EGL stream, we could maybe still try GBM and be lucky. That allows Wayland compositor to pass "eglstream" regardless of the actual hardware, if they want to enable EGL stre

[PATCH xserver 3/5] xwayland: process Wayland events after adding screen

2018-05-24 Thread Olivier Fourdan
When we're done adding a new screen, we need to process pending Wayland events again so that we don't end up processing xdg_output events when unexpected if glamor is disabled (either becauase "-shm" was passed or because "-eglstream" failed): Xwayland: dixGetPrivateAddr: Assertion `key->initi

[PATCH xserver 5/5] xwayland: small xdg_output cleanup

2018-05-24 Thread Olivier Fourdan
Make xwl_output_get_xdg_output() private, it doesn't need to be available elsewhere. Signed-off-by: Olivier Fourdan --- hw/xwayland/xwayland-output.c | 4 +++- hw/xwayland/xwayland.h| 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xwayland/xwayland-output.c b/hw/x

[PATCH xserver 2/5] xwayland: "EGL_EXT_device_base" required for eglstream

2018-05-24 Thread Olivier Fourdan
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

Re: [PATCH xserver] glamor: Work around GEM usage

2018-05-24 Thread Michel Dänzer
On 2018-05-23 10:58 PM, Thomas Hellstrom wrote: > On 05/23/2018 08:00 PM, Adam Jackson wrote: >> On Wed, 2018-05-23 at 11:14 +0200, Thomas Hellstrom wrote: >>> KMS drivers are not required to support GEM. In particular, vmwgfx >>> doesn't support flink and handles and names are identical. >>> Getti

Re: [PATCH xserver] glamor: Work around GEM usage

2018-05-24 Thread Emil Velikov
On 23 May 2018 at 22:23, Mark Kettenis wrote: >> From: Thomas Hellstrom >> Date: Wed, 23 May 2018 22:58:05 +0200 >> >> On 05/23/2018 08:00 PM, Adam Jackson wrote: >> > On Wed, 2018-05-23 at 11:14 +0200, Thomas Hellstrom wrote: >> >> KMS drivers are not required to support GEM. In particular, vmwg

Re: [PATCH xserver] glamor: Work around GEM usage

2018-05-24 Thread Thomas Hellstrom
On 05/24/2018 11:03 AM, Emil Velikov wrote: On 23 May 2018 at 22:23, Mark Kettenis wrote: From: Thomas Hellstrom Date: Wed, 23 May 2018 22:58:05 +0200 On 05/23/2018 08:00 PM, Adam Jackson wrote: On Wed, 2018-05-23 at 11:14 +0200, Thomas Hellstrom wrote: KMS drivers are not required to suppo