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
(cherry picked from commit 7f5767a2f2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
Mohamed Ahmed 2026-03-11 04:07:55 +04:00 committed by Eric Engestrom
parent 4f5c5ab31f
commit 0c31263b0a
2 changed files with 2 additions and 1 deletions

View file

@ -2214,7 +2214,7 @@
"description": "nil/modifiers: Clarify drm_format_mods_for_format rejecting modifiers for unsupported color formats",
"nominated": true,
"nomination_type": 4,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

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