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.
master
Austin Shafer 2 years ago committed by Alexander Orzechowski
parent 3dc5c7e5e7
commit 0910fa9179

@ -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;
} }

Loading…
Cancel
Save