vulkan: Check for descriptor indexing extension
authorBenjamin Otte <otte@redhat.com>
Mon, 19 Jun 2023 12:54:00 +0000 (14:54 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 19 Jun 2023 13:08:00 +0000 (15:08 +0200)
By checking if the extension is supported and avoiding devices when it
isn't, we avoid critical warnings later.

gdk/gdkvulkancontext.c

index 16b0381f21a855f778dc7177dc854f00e95f982f..1dbea45076bc0969c5ca556f37aa52b7900f5551 100644 (file)
@@ -1126,6 +1126,10 @@ gdk_display_create_vulkan_device (GdkDisplay  *display,
   for (i = first; i < last; i++)
     {
       uint32_t n_queue_props;
+
+      if (!physical_device_supports_extension (devices[i], VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME))
+        continue;
+
       vkGetPhysicalDeviceQueueFamilyProperties (devices[i], &n_queue_props, NULL);
       VkQueueFamilyProperties *queue_props = g_newa (VkQueueFamilyProperties, n_queue_props);
       vkGetPhysicalDeviceQueueFamilyProperties (devices[i], &n_queue_props, queue_props);