mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-10 13:51:20 +00:00
vulkan/operation: fix synchronization2 extension detection
The synchronization2 extension is a core part of Vulkan 1.3. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
This commit is contained in:
parent
20eb11e5c4
commit
b9bbcf9202
1 changed files with 16 additions and 9 deletions
|
@ -159,26 +159,33 @@ gst_vulkan_operation_constructed (GObject * object)
|
||||||
GstVulkanDevice *device = priv->cmd_pool->queue->device;
|
GstVulkanDevice *device = priv->cmd_pool->queue->device;
|
||||||
|
|
||||||
#if defined(VK_KHR_synchronization2)
|
#if defined(VK_KHR_synchronization2)
|
||||||
priv->has_sync2 = gst_vulkan_device_is_extension_enabled (device,
|
priv->has_sync2 =
|
||||||
|
gst_vulkan_physical_device_check_api_version (device->physical_device, 1,
|
||||||
|
3, 0)
|
||||||
|
|| gst_vulkan_device_is_extension_enabled (device,
|
||||||
VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME);
|
VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME);
|
||||||
|
|
||||||
if (priv->has_sync2) {
|
if (priv->has_sync2) {
|
||||||
priv->QueueSubmit2 = gst_vulkan_device_get_proc_address (device,
|
if (gst_vulkan_physical_device_check_api_version (device->physical_device,
|
||||||
"vkQueueSubmit2");
|
1, 3, 0))
|
||||||
|
priv->QueueSubmit2 =
|
||||||
|
gst_vulkan_device_get_proc_address (device, "vkQueueSubmit2");
|
||||||
|
|
||||||
if (!priv->QueueSubmit2) {
|
if (!priv->QueueSubmit2) {
|
||||||
priv->QueueSubmit2 =
|
priv->QueueSubmit2 =
|
||||||
gst_vulkan_device_get_proc_address (device, "vkQueueSubmit2KHR");
|
gst_vulkan_device_get_proc_address (device, "vkQueueSubmit2KHR");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!priv->CmdPipelineBarrier2) {
|
if (gst_vulkan_physical_device_check_api_version (device->physical_device,
|
||||||
|
1, 3, 0))
|
||||||
priv->CmdPipelineBarrier2 =
|
priv->CmdPipelineBarrier2 =
|
||||||
gst_vulkan_device_get_proc_address (device, "vkCmdPipelineBarrier2");
|
gst_vulkan_device_get_proc_address (device, "vkCmdPipelineBarrier2");
|
||||||
|
|
||||||
if (!priv->CmdPipelineBarrier2) {
|
if (!priv->CmdPipelineBarrier2) {
|
||||||
priv->CmdPipelineBarrier2 =
|
priv->CmdPipelineBarrier2 =
|
||||||
gst_vulkan_device_get_proc_address (device,
|
gst_vulkan_device_get_proc_address (device,
|
||||||
"vkCmdPipelineBarrier2KHR");
|
"vkCmdPipelineBarrier2KHR");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
priv->has_sync2 = (priv->QueueSubmit2 && priv->CmdPipelineBarrier2);
|
priv->has_sync2 = (priv->QueueSubmit2 && priv->CmdPipelineBarrier2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue