vkEnumeratePhysicalDeviceGroups(3)

# vkEnumeratePhysicalDeviceGroups(3) Manual Page

## Name

vkEnumeratePhysicalDeviceGroups - Enumerates groups of physical devices that can be used to create a single logical device

Loading… please wait.

## C Specification

To retrieve a list of the device groups present in the system, call:

    // Provided by VK_VERSION_1_1
    VkResult vkEnumeratePhysicalDeviceGroups(
        VkInstance                                  instance,
        uint32_t*                                   pPhysicalDeviceGroupCount,
        VkPhysicalDeviceGroupProperties*            pPhysicalDeviceGroupProperties);

or the equivalent command

    // Provided by VK_KHR_device_group_creation
    VkResult vkEnumeratePhysicalDeviceGroupsKHR(
        VkInstance                                  instance,
        uint32_t*                                   pPhysicalDeviceGroupCount,
        VkPhysicalDeviceGroupProperties*            pPhysicalDeviceGroupProperties);

## Parameters

- `instance` is a handle to a Vulkan instance previously created with vkCreateInstance.

- `pPhysicalDeviceGroupCount` is a pointer to an integer related to the number of device groups available or queried, as described below.

- `pPhysicalDeviceGroupProperties` is either `NULL` or a pointer to an array of VkPhysicalDeviceGroupProperties structures.

## Description

If `pPhysicalDeviceGroupProperties` is `NULL`, then the number of device groups available is returned in `pPhysicalDeviceGroupCount`. Otherwise, `pPhysicalDeviceGroupCount` must point to a variable set by the user to the number of elements in the `pPhysicalDeviceGroupProperties` array, and on return the variable is overwritten with the number of structures actually written to `pPhysicalDeviceGroupProperties`. If `pPhysicalDeviceGroupCount` is less than the number of device groups available, at most `pPhysicalDeviceGroupCount` structures will be written, and `VK_INCOMPLETE` will be returned instead of `VK_SUCCESS`, to indicate that not all the available device groups were returned.

Every physical device must be in exactly one device group.

Valid Usage (Implicit)

- VUID-vkEnumeratePhysicalDeviceGroups-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkEnumeratePhysicalDeviceGroups-pPhysicalDeviceGroupCount-parameter
  `pPhysicalDeviceGroupCount` must be a valid pointer to a `uint32_t` value

- VUID-vkEnumeratePhysicalDeviceGroups-pPhysicalDeviceGroupProperties-parameter
  If the value referenced by `pPhysicalDeviceGroupCount` is not `0`, and `pPhysicalDeviceGroupProperties` is not `NULL`, `pPhysicalDeviceGroupProperties` must be a valid pointer to an array of `pPhysicalDeviceGroupCount` VkPhysicalDeviceGroupProperties structures

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

VK_VERSION_1_1, VkInstance, VkPhysicalDeviceGroupProperties

## Document Notes

For more information, see the Vulkan Specification

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

## Copyright

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0