VKGETDEVICEPROCADDR(3)

NAME
vkGetDeviceProcAddr - Return a function pointer for a command

C SPECIFICATION

In order to support systems with multiple Vulkan implementations comprising heterogeneous collections of hardware and software, the function pointers returned by vkGetInstanceProcAddr may point to dispatch code, which calls a different real implementation for different VkDevice objects (and objects created from them). The overhead of this internal dispatch 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 with the command:

    PFN_vkVoidFunction vkGetDeviceProcAddr(
        VkDevice                                    device,
        const char*                                 pName);

PARAMETERS

The table below defines the various use cases for vkGetDeviceProcAddr and expected return value for each case.

DESCRIPTION

The returned function pointer is of type PFN_vkVoidFunction, and must be cast to the type of the command being queried.

Table 1. vkGetDeviceProcAddr behavior
device | pName | return value
NULL | * | undefined
invalid device | * | undefined
device | NULL | undefined
device | core Vulkan command | fp1
device | enabled extension commands | fp1
device | * (any pName not covered above) | NULL

1
    The returned function pointer must only be called with a dispatchable object (the first parameter) that is device or a child of device. e.g. VkDevice, VkQueue, or VkCommandBuffer.
Valid Usage (Implicit)

    • device must be a valid VkDevice handle

    • pName must be a null-terminated string

SEE ALSO

PFN_vkVoidFunction, VkDevice

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkGetDeviceProcAddr

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.