bombomby / optick

C++ Profiler For Games
https://optick.dev
MIT License
2.95k stars 294 forks source link

Support for Vulkan Meta-loaders like volk? #108

Open Honeybunch opened 4 years ago

Honeybunch commented 4 years ago

Just double checking. I don't see it anywhere in the current API but is there currently a mechanism for supporting vulkan meta-loaders? I use volk in a few projects and it's really great. However it seems like Optick has no way to supply custom-loaded vulkan function pointers.

The GPUOpen VMA supports this by allowing the user to provide a struct of function pointers when initializing the allocator. Some functionality like this in OPTICK_GPU_INIT_VULKAN would be really great. Am I missing somewhere where this is implemented or is this planned? If not I'd be willing to take a stab at it.

qbojj commented 1 year ago

I think it should be implemented as

typedef void(*fn_ptr)();
fn_ptr getProcAddress( void *context, const char *name );

It would hide function definitions in headers and allow for extending number of used functions without breaking API. Furthermore it mirrors how Vulkan itself does things. I don't know if making this breaking change would be worth the gain.