hk: Report the correct plane count in VkDrmFormatModifierProperties2?EXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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 <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38200>
This commit is contained in:
Janne Grunau 2025-10-31 09:56:58 +01:00 committed by Marge Bot
parent 943d7b246e
commit 83b97379dc

View file

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