How to fix VK_KHR_portability_subset error on mac m1 while following vulkan tutorial
Asked Answered
B

2

9

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 :(

Bastia answered 25/6, 2021 at 8:22 Comment(4)
Does this answer your question? Vulkan validation warning catch-22 about VK_KHR_portability_subset on MoltenVKDividivi
Sadly it does not, i followed it and in the end i get the last error in my post.Bastia
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?Dividivi
@Dividivi you were right, i added it in the wrong place. Thanks for your answer.Bastia
D
9

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.

Dividivi answered 5/8, 2021 at 19:58 Comment(1)
I can confirm this fixed my issue too. I had it as a device extension and not an instance extension.Bronchus
A
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.

Arliearliene answered 7/3, 2022 at 1:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.