Currently, the vulkan ICD loader description /etc/vulkan/icd.d/nvidia_icd.json is installed based on the tools useflag being set. That doesn't make a lot of sense, as it does not need the tools to be present at all. If at all, it should be tied to the X useflag, because the icd file references the libGLX_nvidia.so library, which is installed based on X being set. Ideally, the libGLX_nvidia.so library should be installed unconditionally as well as the vulkan icd json. Or put behind a new vulkan useflag, that then installs libGLX_nvidia.so, all of its dependencies and the icd loader json file.
How much work is required to get vulkan working? Assuming the nvidia drivers do not contain the vulkan headers and libs.
It already works fine if you have the tools useflag set on nvidia-drivers. This is just about moving it to a more obvious useflag, or introducing a new one.
I am pretty sure you need the ICD loader at least which is not in the gentoo repo i believe. And the vulkan headers for development(https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers). So that is one dependency for the vulkan use flag. I will look at the ebuild and try to write a vulkan useflag and post a patch if it helps.
I don't see why the driver should depend on the vulkan loader or development headers. All it needs to do is install its icd file, and the vulkan loader will find it. Doesn't matter where that loader comes from. Can be a system library, or bundled with some binary application. That's out of the scope of this bug.
Created attachment 450670 [details, diff] vulkan.patch you can try this?
Now i wonder why there is building for settings while there is a seperate package for nvidia-settings... what a mess.
In the current state of the ebuild a vulkan useflag is useless, as the neccesary library the icd file references is only installed when the X useflag is set. So putting the icd in the if use X; block should be fine for now.
Nope. I will continue my patch when i get home.
Fixed in: =x11-drivers/nvidia-drivers-364.19-r1 =x11-drivers/nvidia-drivers-367.57-r1 =x11-drivers/nvidia-drivers-370.28-r1 =x11-drivers/nvidia-drivers-375.10-r1