mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
backend/drm: fix GBM format mismatch
We create the EGL config with GBM_FORMAT_ARGB8888, but then initialize GBM BOs with GBM_FORMAT_XRGB8888. This mismatch confuses Mesa. Instead, we can always use GBM_FORMAT_ARGB8888, and use DRM_FORMAT_XRGB8888 when calling drmModeAddFB2. Fixes https://github.com/swaywm/wlroots/issues/1438
This commit is contained in:
parent
018727b1fc
commit
ee293fab58
7 changed files with 46 additions and 15 deletions
|
|
@ -38,10 +38,10 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
|
|||
EGL_NONE,
|
||||
};
|
||||
|
||||
renderer->gbm_format = GBM_FORMAT_ARGB8888;
|
||||
renderer->wlr_rend = create_renderer_func(&renderer->egl,
|
||||
EGL_PLATFORM_GBM_MESA, renderer->gbm,
|
||||
config_attribs, GBM_FORMAT_ARGB8888);
|
||||
|
||||
config_attribs, renderer->gbm_format);
|
||||
if (!renderer->wlr_rend) {
|
||||
wlr_log(WLR_ERROR, "Failed to create EGL/WLR renderer");
|
||||
goto error_gbm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue