vkphysicaldevice: dump if video maintenance1 is supported

Dump if VK_KHR_video_maintenance1 features is supported by the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7995>
This commit is contained in:
Víctor Manuel Jáquez Leal 2024-07-29 13:49:05 +02:00 committed by GStreamer Marge Bot
parent 7d916c7377
commit a26b348351

View file

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