Can I use volk + vulkan-hpp
devshgraphicsprogramming opened this issue · 4 comments
Hi I was just wondering if I can use
https://github.com/KhronosGroup/Vulkan-Hpp
with volk?
As far as I know, if you use vulkan.hpp you don’t need volk - vulkan.hpp should have support for both dynamically loading functions from device and for some (?) extensions:
If you need to use extensions that vulkan.hpp doesn’t provide you can try to use volk and vulkan.hpp together but I suspect it will not go that well.
AFAIK volk allows me to compile without requiring that the end user has Vulkan available (I can use Vulkan if I find it), also AFAIK Vulkan.hpp would require the DLL/.so to run.
Am I correct?
Yes, that's correct - if you use volk, you don't get a link-time dependency to Vulkan Runtime so you can detect this dynamically (if volkInitialize fails) and fall back to a different graphics API. I'm not sure OTOH if vulkan.hpp provides comparable functionality...
for other who will search for this. There is volk-like mechanism in vulkan hpp which allows to not link to vulkan-loader and use vulkan-headers instead.
KhronosGroup/Vulkan-Hpp#378
https://github.com/KhronosGroup/Vulkan-Hpp/blob/master/tests/DispatchLoaderDynamic/DispatchLoaderDynamic.cpp