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:
emersion 2019-01-29 12:04:12 +01:00
parent 018727b1fc
commit ee293fab58
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
7 changed files with 46 additions and 15 deletions

View file

@ -26,6 +26,8 @@ struct wlr_drm_plane {
struct wlr_drm_surface surf;
struct wlr_drm_surface mgpu_surf;
uint32_t drm_format; // ARGB8888 or XRGB8888
// Only used by cursor
float matrix[9];
struct gbm_bo *cursor_bo;