From b78a691ce2a62660366d06803bdd0877f92287dd Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 26 Aug 2024 16:19:27 -0500 Subject: [PATCH] nil,nvk: Disable modifiers for B10G11R11_UFLOAT and E5B9G9R9_UFLOAT The CTS tests fail due to precision issues (arguably a CTS bug) but it also doesn't make a lot of sense to advertise modifiers on them at all. Fixes: cd428e01d787 ("nvk: Advertise VK_EXT_image_drm_format_modifier") Part-of: --- src/nouveau/nil/modifiers.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nouveau/nil/modifiers.rs b/src/nouveau/nil/modifiers.rs index ff579c60d84..4e1b6f28938 100644 --- a/src/nouveau/nil/modifiers.rs +++ b/src/nouveau/nil/modifiers.rs @@ -207,6 +207,14 @@ pub fn drm_format_mods_for_format( return; } + // These formats don't have a corresponding fourcc format + let p_format: nil_rs_bindings::pipe_format = format.into(); + if p_format == nil_rs_bindings::PIPE_FORMAT_R11G11B10_FLOAT + || p_format == nil_rs_bindings::PIPE_FORMAT_R9G9B9E5_FLOAT + { + return; + } + let compression_type = CompressionType::None; let sector_layout = SectorLayout::for_dev(dev); let gob_kind_version = GOBKindVersion::for_dev(dev);