nil/modifiers: Clarify drm_format_mods_for_format rejecting modifiers for unsupported color formats

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
This commit is contained in:
Mohamed Ahmed 2026-03-11 04:07:55 +04:00 committed by Marge Bot
parent baa13f6a86
commit 7f5767a2f2

View file

@ -268,6 +268,7 @@ pub fn drm_format_mods_for_format(
return;
}
// This rejects unsupported color formats like YCbCr and any others
if !format.supports_color_targets(dev) {
return;
}