From 094bc4eefc1ffc3e2ebf672eb2ab17af4808c63f Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 31 Oct 2025 09:56:58 +0100 Subject: [PATCH] hk: Report the correct plane count in VkDrmFormatModifierProperties2?EXT Fixes import of planar formats like NV12 in gtk4. Allows `gst-launch-1.0 v4l2src ! gtk4paintablesink` to use vulkan instead of falling back to OpenGL. Closes: #14217 Cc: mesa-stable Signed-off-by: Janne Grunau Part-of: (cherry picked from commit 83b97379dc2d7f8db65fd88a8773a495ca70bbd8) --- .pick_status.json | 2 +- src/asahi/vulkan/hk_format.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8d504d85548..ebf4e6d3fbc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3504,7 +3504,7 @@ "description": "hk: Report the correct plane count in VkDrmFormatModifierProperties2?EXT", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/asahi/vulkan/hk_format.c b/src/asahi/vulkan/hk_format.c index 250eb2a70f9..006e3cd05a4 100644 --- a/src/asahi/vulkan/hk_format.c +++ b/src/asahi/vulkan/hk_format.c @@ -67,7 +67,7 @@ get_drm_format_modifier_properties_list( { *out_props = (VkDrmFormatModifierPropertiesEXT){ .drmFormatModifier = mod, - .drmFormatModifierPlaneCount = 1 /* no planar mods */, + .drmFormatModifierPlaneCount = vk_format_get_plane_count(vk_format), .drmFormatModifierTilingFeatures = flags, }; }; @@ -96,7 +96,7 @@ get_drm_format_modifier_properties_list_2( { *out_props = (VkDrmFormatModifierProperties2EXT){ .drmFormatModifier = mod, - .drmFormatModifierPlaneCount = 1, /* no planar mods */ + .drmFormatModifierPlaneCount = vk_format_get_plane_count(vk_format), .drmFormatModifierTilingFeatures = flags, }; };