mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-12 16:35:58 +01:00
backend/drm: fix missing plane formats
The loop populating the format list was exiting early if ARGB8888 was found.
This commit is contained in:
parent
540e23d102
commit
8d2ea9544b
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue