Skip to content

vk_instance: Fixes Broadcom driver breaking vulkaninfo

If the Broadcom driver is built and installed on a system that doesn't have a Broadcom GPU, then vulkaninfo as it is walking the device groups through VK_KHR_device_group_creation won't be able to find the GPU in the group.

The first problem comes from vkEnumeratePhysicalDevices, where the Broadcom driver returns VK_ERROR_INCOMPATIBLE_DRIVER. This trips up vulkaninfo since this return code isn't expected on failure. Instead pPhysicalDeviceCount should return 0 if this driver doesn't support what is in the system.

This same logic follows through to vkEnumeratePhysicalDeviceGroups.

Not sure if this is the correct way to solve the problem, but it seems to resolve it here. Easiest way to test is to just build all drivers on a non-pi system and try to run vulkaninfo.

This also affects the Mesa 22.2-rc3 candidate but since the common vulkan infrastructure isn't there, this would be different to implement.

Merge request reports