volk
volk copied to clipboard
add InstanceTable?
is it possible to add an instance table instead of loading the functions in global scope?
vkGetInstanceProcAddr
, vkCreateInstance
, vkEnumerateInstanceExtensionProperties
, vkEnumerateInstanceLayerProperties
, vkEnumerateInstanceVersion
would need to still be loaded as globals (volk calls them "loader functions").
volk could provide VolkInstanceTable
struct & volkLoadInstanceTable
function for other instance functions I think. Out of curiosity, why do you need this - are you working with multiple Vulkan instances?
vkGetInstanceProcAddr
,vkCreateInstance
,vkEnumerateInstanceExtensionProperties
,vkEnumerateInstanceLayerProperties
,vkEnumerateInstanceVersion
would need to still be loaded as globals (volk calls them "loader functions").volk could provide
VolkInstanceTable
struct &volkLoadInstanceTable
function for other instance functions I think. Out of curiosity, why do you need this - are you working with multiple Vulkan instances?
It would be useful for library developers, where an instance class can be instantiated multiple times by the user for whatever reason. Generally it's better to avoid global state or singletons, after all the vulkan spec allows for multiple instances and the returned function could be different although currently in practice they're the same. Yea, the vulkan global vulkan functions you mentioned are fine.
@ilyas-taouaou let me know if the API in #154 will work for you.