105 lines
3.5 KiB
Plaintext
105 lines
3.5 KiB
Plaintext
// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
vkGetInstanceProcAddr(3)
|
|
========================
|
|
|
|
Name
|
|
----
|
|
vkGetInstanceProcAddr - Return a function pointer for a command
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
// refBegin vkGetInstanceProcAddr Return a function pointer for a command
|
|
|
|
Vulkan commands are not necessarily exposed statically on a platform.
|
|
Function pointers for all Vulkan commands can: be obtained with the
|
|
command:
|
|
|
|
include::../protos/vkGetInstanceProcAddr.txt[]
|
|
|
|
|
|
Parameters
|
|
----------
|
|
|
|
* pname:instance is the instance that the function pointer will be
|
|
compatible with.
|
|
* pname:pName is the name of the command to obtain.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
fname: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.
|
|
Loaders are encouraged to export function symbols for all other core
|
|
Vulkan commands as well; if this is done, then applications that use only
|
|
the core Vulkan commands have no need to use fname:vkGetInstanceProcAddr.
|
|
|
|
Function pointers to commands that do not operate on a specific instance can:
|
|
be obtained by using this command with pname:instance equal to `NULL`. The
|
|
following commands can: be accessed this way:
|
|
|
|
* flink:vkEnumerateInstanceExtensionProperties
|
|
* flink:vkEnumerateInstanceLayerProperties
|
|
* flink:vkCreateInstance
|
|
|
|
The returned function pointer is of type tlink:PFN_vkVoidFunction, and must
|
|
be cast to the type of the command being queried.
|
|
|
|
If pname:instance is a valid sname:VkInstance, function pointers to any
|
|
commands that operate on pname:instance or a child of pname:instance can: be
|
|
obtained. The returned function pointer must: only be called with a
|
|
dispatchable object (the first parameter) that is a child of pname:instance.
|
|
|
|
If pname:pName is not the name of a core Vulkan command, or is an
|
|
extension command for any extension not supported by any available layer or
|
|
implementation, then fname:vkGetInstanceProcAddr will return `NULL`.
|
|
|
|
ifdef::editing-notes[]
|
|
[NOTE]
|
|
.editing-note
|
|
====
|
|
(Jon, Bug 14886 / Gitlab issue 4) The WSI group tentatively agreed that the
|
|
WSI extensions were special, and should get static entry points in link
|
|
libraries and prototypes in +vulkan.h+, while future extensions would have
|
|
to be dynamically loaded. If this decision is upheld by the group as a
|
|
whole, it would probably be encoded in the previous paragraph, in the WSI
|
|
extensions branch of the Specification.
|
|
|
|
However, this decision has not been fully signed off on by the entire Vulkan
|
|
WG yet AFAIK. Note that implementations typically will not support many of the
|
|
WSI extensions, so ``static entry points'' do not relieve apps of the
|
|
neccessity of runtime enabling and testing of each extension before using
|
|
it.
|
|
====
|
|
endif::editing-notes[]
|
|
|
|
include::../validity/protos/vkGetInstanceProcAddr.txt[]
|
|
|
|
// refEnd vkGetInstanceProcAddr PFN_vkVoidFunction
|
|
|
|
|
|
See Also
|
|
--------
|
|
|
|
tlink:PFN_vkVoidFunction, slink:VkInstance
|
|
|
|
|
|
Document Notes
|
|
--------------
|
|
|
|
For more information, see the Vulkan Specification at URL
|
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkGetInstanceProcAddr
|
|
|
|
This page is extracted from the Vulkan Specification.
|
|
Fixes and changes should be made to the Specification,not directly.
|
|
|
|
include::footer.txt[]
|
|
|