vkGetInstanceProcAddr
Function pointers for all Vulkan commands can be obtained by calling:
PFN_vkVoidFunction vkGetInstanceProcAddr(
VkInstance instance,
const char* pName);
instanceis the instance that the function pointer will be compatible with, orNULLfor commands not dependent on any instance.pNameis the name of the command to obtain.
vkGetInstanceProcAddr itself is obtained in a platform- and loader-
specific manner.
Typically, the loader library will export this command as a function symbol,
so applications can link against the loader library, or load it dynamically
and look up the symbol using platform-specific APIs.
The table below defines the various use cases for
vkGetInstanceProcAddr and expected return value (fp is function pointer) for each case.
A valid returned function pointer (fp) must not be NULL.
The returned function pointer is of type PFN_vkVoidFunction, and must be cast to the type of the command being queried before use.
| return value | ||
|---|---|---|
* | undefined: | |
invalid non- | * | undefined: |
fp | ||
instance | vkGetInstanceProcAddr | fp |
instance | core | fp |
instance | enabled instance extension dispatchable command for | fp |
instance | available device extension | fp |
any other case, not covered above | ||
Valid Usage (Implicit)
VUID-vkGetInstanceProcAddr-instance-parameter
If instance is not NULL, instance must be a valid VkInstance handle
VUID-vkGetInstanceProcAddr-pName-parameter
pName must be a null-terminated UTF-8 string