vkGetDeviceProcAddr
In order to support systems with multiple Vulkan implementations, the function pointers returned by vkGetInstanceProcAddr may point to dispatch code that calls a different real implementation for different VkDevice objects or their child objects. The overhead of the internal dispatch for VkDevice objects can be avoided by obtaining device-specific function pointers for any commands that use a device or device-child object as their dispatchable object. Such function pointers can be obtained by calling:
PFN_vkVoidFunction vkGetDeviceProcAddr(
VkDevice device,
const char* pName);
The table below defines the various use cases for vkGetDeviceProcAddr
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.
The function pointer must only be called with a dispatchable object (the
first parameter) that is device or a child of device.
| return value | ||
|---|---|---|
* | undefined: | |
invalid device | * | undefined: |
device | undefined: | |
device | requested core version | fp |
device | enabled extension device-level dispatchable command | fp |
any other case, not covered above | ||
Valid Usage (Implicit)
VUID-vkGetDeviceProcAddr-device-parameter
device must be a valid VkDevice handle
VUID-vkGetDeviceProcAddr-pName-parameter
pName must be a null-terminated UTF-8 string