Re: [PATCH xserver 10/10] xwayland: EGL_IMG_context_priority required by EGLStream

2018-06-05 Thread Emil Velikov
On 5 June 2018 at 18:38, Olivier Fourdan  wrote:
> xwl_glamor_eglstream_init_egl() uses "EGL_IMG_context_priority"
> extension, make sure it's actually available before using it.
>
> Suggested-by: Emil Velikov 
> Signed-off-by: Olivier Fourdan 
> ---
>  hw/xwayland/xwayland-glamor-eglstream.c | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/xwayland/xwayland-glamor-eglstream.c 
> b/hw/xwayland/xwayland-glamor-eglstream.c
> index c226c0089..43f34eed1 100644
> --- a/hw/xwayland/xwayland-glamor-eglstream.c
> +++ b/hw/xwayland/xwayland-glamor-eglstream.c
> @@ -794,6 +794,12 @@ xwl_glamor_eglstream_init_egl(struct xwl_screen 
> *xwl_screen)
>  goto error;
>  }
>
> +if (!epoxy_has_egl_extension(xwl_screen->egl_display,
> + "EGL_IMG_context_priority")) {
> +ErrorF("EGL_IMG_context_priority not available\n");
> +goto error;
> +}
> +
Another approach is to adjust the array to omit the attributes.
Either way, the series is:

Reviewed-by: Emil Velikov 

Thanks for going through my nit-picky suggestions.
Emil
___
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 10/10] xwayland: EGL_IMG_context_priority required by EGLStream

2018-06-05 Thread Olivier Fourdan
xwl_glamor_eglstream_init_egl() uses "EGL_IMG_context_priority"
extension, make sure it's actually available before using it.

Suggested-by: Emil Velikov 
Signed-off-by: Olivier Fourdan 
---
 hw/xwayland/xwayland-glamor-eglstream.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/hw/xwayland/xwayland-glamor-eglstream.c 
b/hw/xwayland/xwayland-glamor-eglstream.c
index c226c0089..43f34eed1 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -794,6 +794,12 @@ xwl_glamor_eglstream_init_egl(struct xwl_screen 
*xwl_screen)
 goto error;
 }
 
+if (!epoxy_has_egl_extension(xwl_screen->egl_display,
+ "EGL_IMG_context_priority")) {
+ErrorF("EGL_IMG_context_priority not available\n");
+goto error;
+}
+
 eglChooseConfig(xwl_screen->egl_display, config_attribs, , 1, );
 if (!n) {
 ErrorF("No acceptable EGL configs found\n");
-- 
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