KhronosGroup / KhronosGroup/Vulkan-Tools
vulkan info exits early if instance creation fails for one GPU of several
- Dominant language
- C++
- Stars
- 491
- Forks
- 202
- Avg merge
- 1h 37m
- Merged PRs (30d)
- 4
Description
I have a multi-GPU setup (built-in Intel GPU, external GPU enclosure with AMD). If both the Intel and AMD GPUs are available (powered on, kernel modules loaded, etc), vulkaninfo works as expected, printing details of both GPUs.
However, if the external GPU is not available, vulkaninfo exits early with an error:
/build/vulkan-tools-1.1.130.0~rc1/vulkaninfo/vulkaninfo.h:368: failed with ERROR_OUT_OF_HOST_MEMORY
No info about the available Intel GPU is printed.
The problem is caused by two issues:
1. I think the AMDVLK driver is erroneously returning VK_ERROR_OUT_OF_MEMORY instead of VK_ERROR_INITIALIZATION_FAILED. I'll contact AMD about that.
2. Unlike other error codes, vulkaninfo gives up upon VK_ERROR_OUT_OF_MEMORY. See https://github.com/KhronosGroup/Vulkan-Loader/blob/c5678a03db383fd0dc5bfb8e9a383043bdbcb57b/loader/loader.c#L6597
I looked at commit 7fc1edea087f77c165fdfad060bc07481526b39e but it's not clear to me why VK_ERROR_OUT_OF_MEMORY is handled specially. My issue is fixed if I simply don't check for VK_ERROR_OUT_OF_MEMORY.
Contributor guide
Assessment
This issue has not been assessed yet.