From a26b34835122cbf73e5a040148321fca02420061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 29 Jul 2024 13:49:05 +0200 Subject: [PATCH] vkphysicaldevice: dump if video maintenance1 is supported Dump if VK_KHR_video_maintenance1 features is supported by the driver. Part-of: --- .../gst-libs/gst/vulkan/gstvkphysicaldevice.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c index a5ef27c9b2..97d5458f46 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c @@ -70,6 +70,9 @@ struct _GstVulkanPhysicalDevicePrivate #if defined (VK_API_VERSION_1_3) VkPhysicalDeviceVulkan13Features features13; VkPhysicalDeviceVulkan13Properties properties13; +#if defined (VK_KHR_video_maintenance1) + VkPhysicalDeviceVideoMaintenance1FeaturesKHR videomaintenance1; +#endif #endif }; @@ -200,6 +203,11 @@ gst_vulkan_physical_device_init (GstVulkanPhysicalDevice * device) priv->features13.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; priv->features12.pNext = &priv->features13; +#if defined (VK_KHR_video_maintenance1) + priv->videomaintenance1.sType = + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR; + priv->features13.pNext = &priv->videomaintenance1; +#endif #endif } @@ -476,7 +484,16 @@ dump_features13 (GstVulkanPhysicalDevice * device, DEBUG_BOOL_STRUCT ("support for (1.3)", features, maintenance4); /* *INDENT-ON* */ } + +#if defined(VK_KHR_video_maintenance1) +static void +dump_videomaintenance1 (GstVulkanPhysicalDevice * device, + VkPhysicalDeviceVideoMaintenance1FeaturesKHR * features) +{ + DEBUG_BOOL_STRUCT ("support for (1.3)", features, videoMaintenance1); +} #endif +#endif /* defined (VK_API_VERSION_1_3) */ static gboolean dump_features (GstVulkanPhysicalDevice * device, GError ** error) @@ -502,6 +519,13 @@ dump_features (GstVulkanPhysicalDevice * device, GError ** error) && iter->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES) dump_features13 (device, (VkPhysicalDeviceVulkan13Features *) iter); +#if defined(VK_KHR_video_maintenance1) + else if (gst_vulkan_instance_check_version (device->instance, 1, 3, 283) + && iter->sType == + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR) + dump_videomaintenance1 (device, + (VkPhysicalDeviceVideoMaintenance1FeaturesKHR *) iter); +#endif #endif } } else