zeux/volk

Expose volkGenLoadLoader

Themaister opened this issue · 4 comments

I have a use-case where I'd like to load my own vulkan.so, and provide my own vkGetInstanceProcAddr to volk. It seems like just making volkGenLoadLoader public would enable that.

zeux commented

That makes sense to me, I've thought about this before. I can expose a separate function, let's say volkInitializeCustom, with the same interface as volkGenLoadLoader to avoid exposing an internal implementation detail.

That's probably better than the PR I made, feel free to close it.

zeux commented

Hmm - would it make more sense to provide something like this?

void volkInitializeCustom(PFN_vkGetInstanceProcAddr GIPA);

Currently volk only loads GIPA using the platform-specific symbol resolution functions, and loads everything else using GIPA - providing a custom GIPA function seems cleaner in this case. Let me know if this would work for you and I can make this change.

That would map better to what I need, so that looks like an ideal API to me.