diff --git a/gfx/context/drm_egl_ctx.c b/gfx/context/drm_egl_ctx.c index 5b9f6ad3e8..37659cdabd 100644 --- a/gfx/context/drm_egl_ctx.c +++ b/gfx/context/drm_egl_ctx.c @@ -422,7 +422,7 @@ bool gfx_ctx_init(void) if (!eglChooseConfig(g_egl_dpy, config_attribs, &g_config, 1, &n) || n != 1) goto error; - g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT, context_attribs); + g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT, (driver.video == &video_gl) ? context_attribs : NULL); if (!g_egl_ctx) goto error; diff --git a/gfx/context/xegl_ctx.c b/gfx/context/xegl_ctx.c index 7c727f0fe5..6d6a35d863 100644 --- a/gfx/context/xegl_ctx.c +++ b/gfx/context/xegl_ctx.c @@ -299,7 +299,7 @@ bool gfx_ctx_set_video_mode( CWBorderPixel | CWColormap | CWEventMask, &swa); XSetWindowBackground(g_dpy, g_win, 0); - g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT, egl_ctx_attribs); + g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT, (driver.video == &video_gl) ? egl_ctx_attribs : NULL); if (!g_egl_ctx) goto error;