Movatterモバイル変換


[0]ホーム

URL:


Vulkan API Reference Pageslatest

vkGetInstanceProcAddr(3)

Name

vkGetInstanceProcAddr - Return a function pointer for a command

C Specification

Function pointers for all Vulkan commandscan be obtained by calling:

// Provided by VK_VERSION_1_0PFN_vkVoidFunction vkGetInstanceProcAddr(    VkInstance                                  instance,    const char*                                 pName);

Parameters

  • instance is the instance that the function pointer will becompatible with, orNULL for commands not dependent on any instance.

  • pName is the name of the command to obtain.

Description

vkGetInstanceProcAddr itself is obtained in a platform- and loader-specific manner.Typically, the loader library will export this command as a function symbol,so applicationscan link against the loader library, or load it dynamicallyand look up the symbol using platform-specific APIs.

The table below defines the various use cases forvkGetInstanceProcAddr and expected return value (“fp” is “functionpointer”) for each case.A valid returned function pointer (“fp”)must not beNULL.

The returned function pointer is of typePFN_vkVoidFunction, andmustbe cast to the type of the command being queried before use.

Table 1.vkGetInstanceProcAddr behavior
instancepNamereturn value

*1

NULL

undefined

invalid non-NULL instance

*1

undefined

NULL

global command2

fp

NULL

vkGetInstanceProcAddr

fp5

instance

vkGetInstanceProcAddr

fp

instance

coredispatchable command

fp3

instance

enabled instance extension dispatchable command forinstance

fp3

instance

available device extension4 dispatchable command forinstance

fp3

any other case, not covered above

NULL

1

"*" means any representable value for the parameter (including validvalues, invalid values, andNULL).

2

The global commands are:vkEnumerateInstanceVersion,vkEnumerateInstanceExtensionProperties,vkEnumerateInstanceLayerProperties, andvkCreateInstance. Dispatchable commands are all other commands which are not global.

3

The returned function pointermust only be called with a dispatchableobject (the first parameter) that isinstance or a child ofinstance, e.g.VkInstance,VkPhysicalDevice,VkDevice,VkQueue, orVkCommandBuffer.

4

An “available device extension” is a device extension supported by anyphysical device enumerated byinstance.

5

Starting with Vulkan 1.2,vkGetInstanceProcAddr can resolve itself with aNULL instance pointer.

Valid Usage (Implicit)
  • VUID-vkGetInstanceProcAddr-instance-parameter
    Ifinstance is notNULL,instancemust be a validVkInstance handle

  • VUID-vkGetInstanceProcAddr-pName-parameter
    pNamemust be a null-terminated UTF-8 string

See Also

Document Notes

For more information, see theVulkan Specification.

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


[8]ページ先頭

©2009-2026 Movatter.jp