vulkan/operation: fix timeline semaphore extension detection

As for synchronization2, the timeline semaphore has been
been promoted in 1.2 and does not have to be enabled explicitely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
This commit is contained in:
Stéphane Cerveau 2025-03-03 11:30:38 +01:00 committed by GStreamer Marge Bot
parent b9bbcf9202
commit 93364189d0
2 changed files with 6 additions and 2 deletions

View File

@ -167,7 +167,8 @@ _vk_image_mem_new_alloc_with_image_info (GstAllocator * allocator,
mem->image = image;
#if defined(VK_KHR_timeline_semaphore)
if (gst_vulkan_device_is_extension_enabled (device,
if (gst_vulkan_physical_device_check_api_version (device->physical_device, 1,
2, 0) || gst_vulkan_device_is_extension_enabled (device,
VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME)) {
VkSemaphoreTypeCreateInfo semaphore_type_info = {
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO,

View File

@ -197,7 +197,10 @@ gst_vulkan_operation_constructed (GObject * object)
priv->has_video_maintenance1 = gst_vulkan_video_has_maintenance1 (device);
#endif
#if defined(VK_KHR_timeline_semaphore)
priv->has_timeline = gst_vulkan_device_is_extension_enabled (device,
priv->has_timeline =
gst_vulkan_physical_device_check_api_version (device->physical_device, 1,
2, 0)
|| gst_vulkan_device_is_extension_enabled (device,
VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME);
#endif
#endif