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: e6f77defec ("nvk/wsi: Advertise modifier support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29563>
(cherry picked from commit 726838620e)
This commit is contained in:
Dave Airlie 2024-06-06 10:26:25 +10:00 committed by Eric Engestrom
parent af0a1b2e23
commit 9060121050
2 changed files with 3 additions and 2 deletions

View file

@ -164,7 +164,7 @@
"description": "nvk: Only enable WSI modifiers if the extension is supported.",
"nominated": false,
"nomination_type": 1,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": "e6f77defec0d61f9f5851bdbda5bf4cc97cd1cea",
"notes": null

View file

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