mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
vkinstance: Don't abort in case that system has no available vulkan device
Specification doesn't have restriction that returned pPhysicalDeviceCount value must be non-zero Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2304>
This commit is contained in:
parent
80b3ba7b36
commit
4d0f136297
1 changed files with 9 additions and 1 deletions
|
@ -975,7 +975,15 @@ gst_vulkan_instance_open (GstVulkanInstance * instance, GError ** error)
|
|||
if (gst_vulkan_error_to_g_error (err, error,
|
||||
"vkEnumeratePhysicalDevices") < 0)
|
||||
goto error;
|
||||
g_assert (instance->n_physical_devices > 0);
|
||||
|
||||
if (instance->n_physical_devices == 0) {
|
||||
GST_WARNING_OBJECT (instance, "No available physical device");
|
||||
g_set_error_literal (error,
|
||||
GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_NOT_FOUND,
|
||||
"No available physical device");
|
||||
goto error;
|
||||
}
|
||||
|
||||
instance->physical_devices =
|
||||
g_new0 (VkPhysicalDevice, instance->n_physical_devices);
|
||||
err =
|
||||
|
|
Loading…
Reference in a new issue