aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-10-31 17:24:02 +0100
committeremersion <contact@emersion.fr>2018-11-04 09:00:55 +0100
commitb5125ff3282b46a1e5fb111cef09f86d5b4d7aab (patch)
tree0a9963ea9186e38fcc1d8d4b4695a4f852491040 /backend
parent62d646f2b8b560ce9b64e6a840ac7bdc8d60bbb8 (diff)
backend/drm: specify minimum config attributes
Since the format used by DRM is GBM_FORMAT_ARGB8888, we need at least a R, G, B and A channel.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/renderer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index fa7d090e..70b1bcbe 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -30,8 +30,17 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
create_renderer_func = wlr_renderer_autocreate;
}
+ static EGLint config_attribs[] = {
+ EGL_RED_SIZE, 1,
+ EGL_GREEN_SIZE, 1,
+ EGL_BLUE_SIZE, 1,
+ EGL_ALPHA_SIZE, 1,
+ EGL_NONE,
+ };
+
renderer->wlr_rend = create_renderer_func(&renderer->egl,
- EGL_PLATFORM_GBM_MESA, renderer->gbm, NULL, GBM_FORMAT_ARGB8888);
+ EGL_PLATFORM_GBM_MESA, renderer->gbm,
+ config_attribs, GBM_FORMAT_ARGB8888);
if (!renderer->wlr_rend) {
wlr_log(WLR_ERROR, "Failed to create EGL/WLR renderer");