5

Hi i'm having an error on compile. Apparently i'm missing an extension :

validation layer: Validation Error: [ VUID-VkDeviceCreateInfo-pProperties-04451 ] Object 0: handle = 0x1055040c0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x3a3b6ca0 | vkCreateDevice: VK_KHR_portability_subset must be enabled because physical device VkPhysicalDevice 0x1055040c0[] supports it The Vulkan spec states: If the [VK_KHR_portability_subset] extension is included in pProperties of vkEnumerateDeviceExtensionProperties, ppEnabledExtensions must include "VK_KHR_portability_subset". (https://vulkan.lunarg.com/doc/view/1.2.176.1/mac/1.2-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pProperties-04451)

I naively added to the deviceExtension vector "VK_KHR_portability_subset" and then got a second error who seems to be similar to the previous one.

validation layer: Validation Error: [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x12537a2c | Missing extension required by the device extension VK_KHR_portability_subset: VK_KHR_get_physical_device_properties2. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list (https://vulkan.lunarg.com/doc/view/1.2.176.1/mac/1.2-extensions/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)

I added to the deviceExtension vector "VK_KHR_get_physical_device_properties2" and then got a third error :

libc++abi: terminating with uncaught exception of type std::runtime_error: failed to find a suitable GPU!

The thing is that previously he recognized that i was using a m1 chip but now no informations on the device shows :(

Thomas Ung
  • 154
  • 13
  • Does this answer your question? [Vulkan validation warning catch-22 about VK\_KHR\_portability\_subset on MoltenVK](https://stackoverflow.com/questions/66659907/vulkan-validation-warning-catch-22-about-vk-khr-portability-subset-on-moltenvk) – krOoze Jun 25 '21 at 21:24
  • Sadly it does not, i followed it and in the end i get the last error in my post. – Thomas Ung Jun 26 '21 at 05:38
  • 2
    You are putting it into `vkCreateDevice`, but `VK_KHR_get_physical_device_properties2` is an instance extension that belongs to `vkCreateInstance`. Are you saying the problem persists even if you fix that? – krOoze Jun 26 '21 at 11:01
  • @krOoze you were right, i added it in the wrong place. Thanks for your answer. – Thomas Ung Jun 27 '21 at 17:43

2 Answers2

6

I added to the deviceExtension vector "VK_KHR_get_physical_device_properties2"

VK_KHR_get_physical_device_properties2 is an instance extension, and as such belongs to vkCreateInstance (not device).

Reportedly, that fixed your issue.

krOoze
  • 12,301
  • 1
  • 20
  • 34
  • I can confirm this fixed my issue too. I had it as a device extension and not an instance extension. – Sienna Dec 09 '22 at 06:34
1

I have encountered same message on same device and after some research understood it's not error, just a warning. If you don't really need to handle this special case, you can just ignore it.