libvulkan: fix support for 1.1 vkEnumeratePhysicalDeviceGroups
When the icd instance is 1.0, VK_KHR_device_group_creation will be
enabled by the loader if the extension is advertised. Then we will try
to use vkEnumeratePhysicalDeviceGroupsKHR as a fallback.
Bug: 160276146
Test: adb shell cmd gpu vkjson
Test: dEQP-VK.api.info.instance.physical_device_groups
Change-Id: I9e2d9af66e80244f1d43b54ac2800316200c0d00
diff --git a/vulkan/libvulkan/driver_gen.cpp b/vulkan/libvulkan/driver_gen.cpp
index 39fd15a..36577c2 100644
--- a/vulkan/libvulkan/driver_gen.cpp
+++ b/vulkan/libvulkan/driver_gen.cpp
@@ -505,6 +505,7 @@
if (strcmp(name, "VK_ANDROID_external_memory_android_hardware_buffer") == 0) return ProcHook::ANDROID_external_memory_android_hardware_buffer;
if (strcmp(name, "VK_KHR_bind_memory2") == 0) return ProcHook::KHR_bind_memory2;
if (strcmp(name, "VK_KHR_get_physical_device_properties2") == 0) return ProcHook::KHR_get_physical_device_properties2;
+ if (strcmp(name, "VK_KHR_device_group_creation") == 0) return ProcHook::KHR_device_group_creation;
// clang-format on
return ProcHook::EXTENSION_UNKNOWN;
}
@@ -546,6 +547,7 @@
INIT_PROC(false, instance, GetPhysicalDeviceProperties2);
INIT_PROC_EXT(KHR_get_physical_device_properties2, true, instance, GetPhysicalDeviceProperties2KHR);
INIT_PROC(false, instance, EnumeratePhysicalDeviceGroups);
+ INIT_PROC_EXT(KHR_device_group_creation, true, instance, EnumeratePhysicalDeviceGroupsKHR);
// clang-format on
return success;