vulkanvalidation-layers

Driver says it supports interface version 6 but still exports core entrypoints


I have experience in OpenGL and I'm starting to learn Vulkan, following from this tutorial, and I am onto the testing section.

However, instead of the intended output: image can also be seen in the tutorial linked above

I'm getting the following output instead:

[vlk] Searching for ICD drivers named /usr/lib32/amdvlkpro32.so
[vlk] Searching for ICD drivers named /usr/lib/amdvlkpro64.so
[vlk] loader_scanned_icd_add: Driver /usr/lib/amdvlkpro64.so says it supports interface version 6 but still exports core entrypoints (Policy #LDP_DRIVER_6)
[vlk] Searching for ICD drivers named /usr/lib32/libvulkan_radeon.so
[vlk] Searching for ICD drivers named /usr/lib/libvulkan_radeon.so
[vlk] Build ICD instance extension list
[vlk] Build ICD instance extension list
[vlk] Build ICD instance extension list

The difference between validation layer: and vlk prefixes is just a difference in how I'm displaying the messages in my callback, nothing else has been changed. For the record, I have indeed removed the call to DestroyDebugUtilsMessengerEXT() as told in the tutorial.

Sorry; because I'm so new to Vulkan, I don't know what code to put here, but I can add whatever's necessary.

I'm using a Radeon RX 480. I'm running on Arch Linux, and here is the driver-related output of lspci -v:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev c7) (prog-if 00 [VGA controller])
...
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

Looking at the output, it seems that Vulkan is searching for both the proprietary drivers (amdvlkpro) and the open-source (mesa) drivers (libvulkan_radeon) - at least I assume this is what these executables are.

It seems to me this is a problem with the proprietary AMD drivers, so - if this is indeed the case - how would I prevent this from happening? Is there a way to force Vulkan to use the open-source driver without uninstalling the proprietary one?

Update

To answer my previous question, yes - with amd-vulkan-prefixes. I have now tested the program on all AMD drivers, and it doesn't work as intended with any of them.

The following is the output of the program when running under each driver. This is the entire output, from start to end.

With RADV (vulkan-radeon)

[vlk] Searching for ICD drivers named /usr/lib32/libvulkan_radeon.so
[vlk] Searching for ICD drivers named /usr/lib/libvulkan_radeon.so
[vlk] Build ICD instance extension list
[vlk] Build ICD instance extension list

Even though there is no LDP_DRIVER_6 message, the desired output is still not achieved.

With AMDVLK Open (amdvlk)

[vlk] Searching for ICD drivers named /usr/lib32/amdvlk32.so
[vlk] Searching for ICD drivers named /usr/lib/amdvlk64.so
[vlk] loader_scanned_icd_add: Driver /usr/lib/amdvlk64.so says it supports interface version 6 but still exports core entrypoints (Policy #LDP_DRIVER_6)
[vlk] Build ICD instance extension list
[vlk] Build ICD instance extension list

With AMDVLK Closed (vulkan-amdgpu-pro)

[vlk] Searching for ICD drivers named /usr/lib32/amdvlkpro32.so
[vlk] Searching for ICD drivers named /usr/lib/amdvlkpro64.so
[vlk] loader_scanned_icd_add: Driver /usr/lib/amdvlkpro64.so says it supports interface version 6 but still exports core entrypoints (Policy #LDP_DRIVER_6)
[vlk] Build ICD instance extension list
[vlk] Build ICD instance extension list

Solution

  • LDP_DRIVER_6 has been removed from the list of errors. In the first version of the loader, drivers would export basic Vulkan functions, then they later changed the spec so that drivers exported different functions with a vk_icd prefix. They then added the policy LDP_DRIVER_6 due to concerns about how some platforms handle imports from dynamic libraries; in practice this isn't really an issue and major vendors continued to support all versions of the loader, thus policy LDP_DRIVER_6 was removed. You can view some more details in the Loader-Driver Interface Spec archive.

    If you really want to use another driver that is possible. This is done by setting the environment variable VK_ICD_FILENAMES to a colon separated list of full paths to the driver's JSON manifest files, typically in the same location as the actaul driver. This will cause only the drivers specified in the VK_ICD_FILENAMES list to be loaded. The latest way to do this - though it is probably not supported by your vulkan loader as the version which implements it deprecates LDP_DRIVER_6 - is to use VK_DRIVER_FILES which behaves exactly the same as VK_ICD_FILENAMES (both are supported in the latest version, but it will prefer VK_DRIVER_FILES), additionally there is now VK_ADD_DRIVER_FILES which contains a list of drivers to be loaded before the default list. If VK_ICD_FILENAMES or VK_DRIVER_FILES is set VK_ADD_DRIVER_FILES will be ignored. The current way of doing this can be read here archive, though given you're getting an LDP_DRIVER_6 error you likely need to use the older method described here archive.