diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 6e0fc6596..60d0df893 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -933,8 +933,6 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) { struct glamor_egl_screen_private *glamor_egl; const GLubyte *renderer; - EGLConfig egl_config; - int n; glamor_egl = calloc(sizeof(*glamor_egl), 1); if (glamor_egl == NULL) @@ -977,6 +975,7 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) } GLAMOR_CHECK_EGL_EXTENSION(KHR_surfaceless_context); + GLAMOR_CHECK_EGL_EXTENSION(KHR_no_config_context); if (eglBindAPI(EGL_OPENGL_API)) { static const EGLint config_attribs_core[] = { @@ -993,12 +992,13 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) }; glamor_egl->context = eglCreateContext(glamor_egl->display, - NULL, EGL_NO_CONTEXT, + EGL_NO_CONFIG_KHR, EGL_NO_CONTEXT, config_attribs_core); if (glamor_egl->context == EGL_NO_CONTEXT) glamor_egl->context = eglCreateContext(glamor_egl->display, - NULL, EGL_NO_CONTEXT, + EGL_NO_CONFIG_KHR, + EGL_NO_CONTEXT, config_attribs); } @@ -1029,14 +1029,8 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) goto error; } - if (!eglChooseConfig(glamor_egl->display, NULL, &egl_config, 1, &n)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "glamor: No acceptable EGL configs found\n"); - goto error; - } - glamor_egl->context = eglCreateContext(glamor_egl->display, - egl_config, EGL_NO_CONTEXT, + EGL_NO_CONFIG_KHR, EGL_NO_CONTEXT, config_attribs); if (glamor_egl->context == EGL_NO_CONTEXT) { diff --git a/hw/kdrive/ephyr/ephyr_glamor.c b/hw/kdrive/ephyr/ephyr_glamor.c index 44e48ff59..724611d69 100644 --- a/hw/kdrive/ephyr/ephyr_glamor.c +++ b/hw/kdrive/ephyr/ephyr_glamor.c @@ -325,7 +325,7 @@ ephyr_glamor_screen_init(xcb_window_t win, xcb_visualid_t vid) context_attribs[i++] = ephyr_glamor_gles2 ? 0 : 1; context_attribs[i++] = EGL_NONE; - ctx = eglCreateContext(glamor->dpy, config, EGL_NO_CONTEXT, + ctx = eglCreateContext(glamor->dpy, EGL_NO_CONFIG_KHR, EGL_NO_CONTEXT, context_attribs); if (ctx == NULL) diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c index 8151d7776..28666460d 100644 --- a/hw/xwayland/xwayland-glamor-eglstream.c +++ b/hw/xwayland/xwayland-glamor-eglstream.c @@ -989,8 +989,10 @@ xwl_glamor_eglstream_init_egl(struct xwl_screen *xwl_screen) #endif eglBindAPI(EGL_OPENGL_API); - xwl_screen->egl_context = eglCreateContext( - xwl_screen->egl_display, config, EGL_NO_CONTEXT, attrib_list); + xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display, + EGL_NO_CONFIG_KHR, + EGL_NO_CONTEXT, + attrib_list); if (xwl_screen->egl_context == EGL_NO_CONTEXT) { ErrorF("Failed to create main EGL context: 0x%x\n", eglGetError()); goto error; diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c index 12d820e44..b829cbd34 100644 --- a/hw/xwayland/xwayland-glamor-gbm.c +++ b/hw/xwayland/xwayland-glamor-gbm.c @@ -785,12 +785,12 @@ xwl_glamor_try_big_gl_api(struct xwl_screen *xwl_screen) eglBindAPI(EGL_OPENGL_API); xwl_screen->egl_context = - eglCreateContext(xwl_screen->egl_display, NULL, + eglCreateContext(xwl_screen->egl_display, EGL_NO_CONFIG_KHR, EGL_NO_CONTEXT, config_attribs_core); if (xwl_screen->egl_context == EGL_NO_CONTEXT) xwl_screen->egl_context = - eglCreateContext(xwl_screen->egl_display, NULL, + eglCreateContext(xwl_screen->egl_display, EGL_NO_CONFIG_KHR, EGL_NO_CONTEXT, NULL); if (!xwl_glamor_try_to_make_context_current(xwl_screen)) { @@ -824,7 +824,8 @@ xwl_glamor_try_gles_api(struct xwl_screen *xwl_screen) eglBindAPI(EGL_OPENGL_ES_API); - xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display, NULL, + xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display, + EGL_NO_CONFIG_KHR, EGL_NO_CONTEXT, gles_attribs); if (!xwl_glamor_try_to_make_context_current(xwl_screen)) {