VKENUMERATEPHYSICALD(3)

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

C SPECIFICATION

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

PARAMETERS

instance
    A handle to the instance to be used to enumerate devices.

pPhysicalDeviceCount
    A pointer to a variable containing the maximum number of devices to enumerate.

pPhysicalDevices
    A pointer to an array that will be filled with handles to the enumerated devices.

DESCRIPTION

vkEnumeratePhysicalDevices generates a list of the physical devices accessible to the instance of Vulkan specified in instance.

pPhysicalDeviceCount is a pointer to a variable which contains the number of devices to enumerate. pPhysicalDeviceCount must not be NULL. pPhysicalDevices is a pointer to an array of VkPhysicalDevice handles which will be filled with handles to the enumerated devices.

If pPhysicalDevices is NULL, then the initial value of the variable pointed to by pPhysicalDeviceCount is ignored and this variable is overwritten with the number of physical devices accessible to instance.

If pPhysicalDevices is not NULL, then pPhysicalDeviceCount should point to a variable that has been initialized with the size of the array pointed to by pPhysicalDevices. No more than this number of physical device handles will be written into the output array. The actual number of device handles written into pPhysicalDevices is then written into the variable pointed to by pPhysicalDeviceCount.

VALID USAGE

    • 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

vkGetPhysicalDeviceFeatures, vkCreateDevice

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.