VKGETINSTANCEPROCADD(3)

NAME
vkGetInstanceProcAddr - Return a function pointer for a command

C SPECIFICATION

    PFN_vkVoidFunction vkGetInstanceProcAddr(
        VkInstance                                  instance,
        const char*                                 pName);

PARAMETERS

instance
    The instance whose function pointer to query

pName
    The name of the command

DESCRIPTION

vkGetInstanceProcAddr returns a function pointer for the command specified in pName as it corresponds to instance. Depending on the operating system, supporting components, software environment and hardware topology, the address returned for a single command name may be different for different values of instance.

If instance is NULL, vkGetInstanceProcAddr will return non-NULL function pointers for the global commands vkEnumerateInstanceExtensionProperties, vkEnumerateInstanceLayerProperties, and vkCreateInstance. It will return NULL for all other commands, since they may have different implementations in different instances.

If instance is a valid instance, vkGetInstanceProcAddr will return a non-NULL function pointer for any core command except the global commands listed previously. It will also return non-NULL for any extension command, if there is a layer or driver available that implements the extension.

The function pointers returned by vkGetInstanceProcAddr may be used with any object of the appropriate type derived from the instance. For example, the function pointer for a command with a VkDevice first parameter can be used with any VkDevice object created from physical devices belonging to the instance.

VALID USAGE

    • If instance is not NULL, instance must be a valid VkInstance handle

    • pName must be a null-terminated string

    • If instance is NULL, pName must be one of: vkEnumerateInstanceExtensionProperties, vkEnumerateInstanceLayerProperties or vkCreateInstance

    • If instance is not NULL, pName must be the name of a core command or a command from an enabled extension, other than: vkEnumerateInstanceExtensionProperties, vkEnumerateInstanceLayerProperties or vkCreateInstance

RETURN VALUE

Upon success, vkGetInstanceProcAddr returns the address (PFN_vkVoidFunction) of the command whose name is specified by pName. If pName is not supported by the Vulkan library, then vkGetInstanceProcAddr returns NULL.

SEE ALSO

vkGetDeviceProcAddr, vkCreateInstance

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.