From 6d867fcb0b2a23c1e71e47122c59df13d42a3228 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 6 Jun 2024 13:41:09 +1000 Subject: [PATCH] fix an nvk bug when kernel modifiers aren't working yet --- ...WSI-modifiers-if-the-extension-is-su.patch | 33 +++++++++++++++++++ mesa.spec | 1 + 2 files changed, 34 insertions(+) create mode 100644 0001-nvk-Only-enable-WSI-modifiers-if-the-extension-is-su.patch diff --git a/0001-nvk-Only-enable-WSI-modifiers-if-the-extension-is-su.patch b/0001-nvk-Only-enable-WSI-modifiers-if-the-extension-is-su.patch new file mode 100644 index 0000000..05d3151 --- /dev/null +++ b/0001-nvk-Only-enable-WSI-modifiers-if-the-extension-is-su.patch @@ -0,0 +1,33 @@ +From 726838620ebdd890edf481d7821edc0728b1ebe4 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Thu, 6 Jun 2024 10:26:25 +1000 +Subject: [PATCH] nvk: Only enable WSI modifiers if the extension is supported. + +The extension relies on the kernel being new, so don't tell +wsi about it. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11270 +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11166 +Fixes: e6f77defec0d ("nvk/wsi: Advertise modifier support") +Part-of: +--- + src/nouveau/vulkan/nvk_wsi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/nouveau/vulkan/nvk_wsi.c b/src/nouveau/vulkan/nvk_wsi.c +index 6c9c459ad36..11c554721ac 100644 +--- a/src/nouveau/vulkan/nvk_wsi.c ++++ b/src/nouveau/vulkan/nvk_wsi.c +@@ -29,7 +29,8 @@ nvk_init_wsi(struct nvk_physical_device *pdev) + return result; + + pdev->wsi_device.supports_scanout = false; +- pdev->wsi_device.supports_modifiers = true; ++ pdev->wsi_device.supports_modifiers = ++ pdev->vk.supported_extensions.table.EXT_image_drm_format_modifier; + + pdev->vk.wsi_device = &pdev->wsi_device; + +-- +2.45.2 + diff --git a/mesa.spec b/mesa.spec index e72b098..ed2563d 100644 --- a/mesa.spec +++ b/mesa.spec @@ -77,6 +77,7 @@ Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz Source1: Mesa-MLAA-License-Clarification-Email.txt Patch10: gnome-shell-glthread-disable.patch +Patch11: 0001-nvk-Only-enable-WSI-modifiers-if-the-extension-is-su.patch BuildRequires: meson >= 1.3.0 BuildRequires: gcc