diff options
author | emersion <contact@emersion.fr> | 2018-11-04 09:23:57 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-11-10 13:20:54 +0100 |
commit | 09550032b7e897755be30c6339f97489b07570ff (patch) | |
tree | 23076b31c8760cda651fdce364376f757afbc2b3 /backend | |
parent | ca570fa63cb187ba078d95e0973da8562687673f (diff) |
render: correctly set EGL_RENDERABLE_TYPE
This should be set to EGL_OPENGL_ES2_BIT.
Also fixes EGL config attributes in the headless and X11 backends.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/headless/backend.c | 7 | ||||
-rw-r--r-- | backend/x11/backend.c | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c index cbc158f3..c0fc6022 100644 --- a/backend/headless/backend.c +++ b/backend/headless/backend.c @@ -103,10 +103,9 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display, static const EGLint config_attribs[] = { EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_ALPHA_SIZE, 0, - EGL_BLUE_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_RED_SIZE, 8, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_BLUE_SIZE, 1, + EGL_GREEN_SIZE, 1, + EGL_RED_SIZE, 1, EGL_NONE, }; diff --git a/backend/x11/backend.c b/backend/x11/backend.c index 7053e2f0..c0a11fbb 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -282,8 +282,17 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, create_renderer_func = wlr_renderer_autocreate; } + static EGLint config_attribs[] = { + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, + EGL_RED_SIZE, 1, + EGL_GREEN_SIZE, 1, + EGL_BLUE_SIZE, 1, + EGL_ALPHA_SIZE, 0, + EGL_NONE, + }; + x11->renderer = create_renderer_func(&x11->egl, EGL_PLATFORM_X11_KHR, - x11->xlib_conn, NULL, x11->screen->root_visual); + x11->xlib_conn, config_attribs, x11->screen->root_visual); if (x11->renderer == NULL) { wlr_log(WLR_ERROR, "Failed to create renderer"); |