diff options
author | Simon Ser <contact@emersion.fr> | 2019-08-14 21:53:10 +0300 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2019-08-15 12:33:42 +1200 |
commit | 8d2ea9544b527b7a1e31bf559d2182782bc6107e (patch) | |
tree | 4e6577e6c8fdf1db9ec6f760ca4f5ed2b9843766 /backend/drm/drm.c | |
parent | 540e23d1029acf621c8da992aa56a4d7f98abe3a (diff) |
backend/drm: fix missing plane formats
The loop populating the format list was exiting early if ARGB8888 was found.
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r-- | backend/drm/drm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index bc74a506..85c750dd 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -98,11 +98,15 @@ static bool add_plane(struct wlr_drm_backend *drm, p->id = drm_plane->plane_id; p->props = *props; + for (size_t j = 0; j < drm_plane->count_formats; ++j) { + wlr_drm_format_set_add(&p->formats, drm_plane->formats[j], + DRM_FORMAT_MOD_INVALID); + } + // Choose an RGB format for the plane uint32_t rgb_format = DRM_FORMAT_INVALID; for (size_t j = 0; j < drm_plane->count_formats; ++j) { uint32_t fmt = drm_plane->formats[j]; - wlr_drm_format_set_add(&p->formats, fmt, DRM_FORMAT_MOD_INVALID); if (fmt == DRM_FORMAT_ARGB8888) { // Prefer formats with alpha channel |