drm_plane_pick_render_format: return false if no format could be found

Commit 90d08f8f1c changed the way
wlr_drm_format_intersect worked, including passing in a destination
format list. This breaks scenarios where the intersection doesn't
find any matching formats, since we still have a valid destination
format set. This changes it to only return true if more than one
matching format is present in the intersection list.
This commit is contained in:
Austin Shafer 2023-05-17 13:07:29 -04:00 committed by Alexander Orzechowski
parent 3dc5c7e5e7
commit 0910fa9179

View File

@ -177,6 +177,12 @@ bool drm_plane_pick_render_format(struct wlr_drm_plane *plane,
return false; return false;
} }
if (fmt->len == 0) {
wlr_drm_format_finish(fmt);
wlr_log(WLR_DEBUG, "Failed to find matching plane and renderer modifiers");
return false;
}
return true; return true;
} }