From dc0deb61f50b1069a4d4527eeb921093c0a282db Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 10 Oct 2018 13:50:34 +0200 Subject: [PATCH] egl_init: Bail out when the extension GL_KHR_create_context is not available Functionality of the extension is used to create the context. Closes: #37 Reviewed-by: Gurchetan Singh Signed-off-by: Gert Wollny Signed-off-by: Jakob Bornecrantz --- src/virgl_egl_context.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/virgl_egl_context.c b/src/virgl_egl_context.c index 5fc0b15..aa26354 100644 --- a/src/virgl_egl_context.c +++ b/src/virgl_egl_context.c @@ -219,6 +219,12 @@ struct virgl_egl *virgl_egl_init(int fd, bool surfaceless, bool gles) /* require surfaceless context */ if (!virgl_egl_has_extension_in_string(extension_list, "EGL_KHR_surfaceless_context")) goto fail; + } + + if (!virgl_egl_has_extension_in_string(extension_list, "EGL_KHR_create_context")) { + fprintf(stderr, "failed to find EGL_KHR_create_context extensions\n"); + goto fail; + } d->have_mesa_drm_image = false; d->have_mesa_dma_buf_img_export = false;