VKENUMERATEPHYSICALD(3)

NAME
vkEnumeratePhysicalDevices - Enumerates the physical devices accessible to a Vulkan instance

C SPECIFICATION

To retrieve a list of physical device objects representing the physical devices installed in the system, call:

    VkResult vkEnumeratePhysicalDevices(
        VkInstance                                  instance,
        uint32_t*                                   pPhysicalDeviceCount,
        VkPhysicalDevice*                           pPhysicalDevices);

PARAMETERS

    • instance is a handle to a Vulkan instance previously created with vkCreateInstance.

    • pPhysicalDeviceCount is a pointer to an integer related to the number of physical devices available or queried, as described below.

    • pPhysicalDevices is either NULL or a pointer to an array of VkPhysicalDevice handles.

DESCRIPTION

If pPhysicalDevices is NULL, then the number of physical devices available is returned in pPhysicalDeviceCount. Otherwise, pPhysicalDeviceCount must point to a variable set by the user to the number of elements in the pPhysicalDevices array, and on return the variable is overwritten with the number of structures actually written to pPhysicalDevices. If pPhysicalDeviceCount is less than the number of physical devices available, at most pPhysicalDeviceCount structures will be written. If pPhysicalDeviceCount is smaller than the number of physical devices available, VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available physical devices were returned. Valid Usage (Implicit)

    • instance must be a valid VkInstance handle

    • pPhysicalDeviceCount must be a pointer to a uint32_t value

    • If the value referenced by pPhysicalDeviceCount is not 0, and pPhysicalDevices is not NULL, pPhysicalDevices must be a pointer to an array of pPhysicalDeviceCount VkPhysicalDevice handles
Return Codes

On success, this command returns

        • VK_SUCCESS

        • VK_INCOMPLETE

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

        • VK_ERROR_INITIALIZATION_FAILED

SEE ALSO

VkInstance, VkPhysicalDevice

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

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

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.