VK_KHR_device_group extension.
All functionality in this extension is included in core Vulkan 1.1, with the KHR suffix omitted. The original type, enum and command names are still available as aliases of the core functionality.
VkDeviceCreateInfo devCreateInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO };
// (not shown) fill out devCreateInfo as usual.
uint32_t deviceGroupCount = 0;
VkPhysicalDeviceGroupPropertiesKHR *props = NULL;
// Query the number of device groups
vkEnumeratePhysicalDeviceGroupsKHR(g_vkInstance, &deviceGroupCount, NULL);
// Allocate and initialize structures to query the device groups
props = (VkPhysicalDeviceGroupPropertiesKHR *)malloc(deviceGroupCount*sizeof(VkPhysicalDeviceGroupPropertiesKHR));
for (i = 0; i < deviceGroupCount; ++i) {
props[i].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR;
props[i].pNext = NULL;
}
vkEnumeratePhysicalDeviceGroupsKHR(g_vkInstance, &deviceGroupCount, props);
// If the first device group has more than one physical device. create
// a logical device using all of the physical devices.
VkDeviceGroupDeviceCreateInfoKHR deviceGroupInfo = { VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR };
if (props[0].physicalDeviceCount > 1) {
deviceGroupInfo.physicalDeviceCount = props[0].physicalDeviceCount;
deviceGroupInfo.pPhysicalDevices = props[0].physicalDevices;
devCreateInfo.pNext = &deviceGroupInfo;
}
vkCreateDevice(props[0].physicalDevices[0], &devCreateInfo, NULL, &g_vkDevice);
free(props);
VK_KHR_device_group_creation| Modifier and Type | Field and Description |
|---|---|
| public static final String | VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME
The extension name. |
| public static final int | VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION
The extension specification version. |
| public static final int | VK_MAX_DEVICE_GROUP_SIZE_KHR
VK_MAX_DEVICE_GROUP_SIZE_KHR |
| public static final int | VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR
Extends |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static int | nvkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, long
a pointer to an integer related to the number of device groups available or queried, as described below. pPhysicalDeviceGroupCount, long pPhysicalDeviceGroupProperties)Unsafe version of: |
| public static int | vkEnumeratePhysicalDeviceGroupsKHR(VkInstance
a handle to a Vulkan instance previously created with instance, IntBuffer CreateInstance.a pointer to an integer related to the number of device groups available or queried, as described below. pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties.either pPhysicalDeviceGroupPropertiesNULL or a pointer to an array of VkPhysicalDeviceGroupProperties structures. |
| public static int | vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, int[] pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties.
Array version of: |
| VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME | back to summary |
|---|---|
| public static final String VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME The extension name. | |
| VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION | back to summary |
|---|---|
| public static final int VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION The extension specification version. | |
| VK_MAX_DEVICE_GROUP_SIZE_KHR | back to summary |
|---|---|
| public static final int VK_MAX_DEVICE_GROUP_SIZE_KHR VK_MAX_DEVICE_GROUP_SIZE_KHR | |
| VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR | back to summary |
|---|---|
| public static final int VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR Extends | |
| VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR Extends Enum values: | |
| VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR Extends Enum values: | |
| KHRDeviceGroupCreation | back to summary |
|---|---|
| protected KHRDeviceGroupCreation() | |
| nvkEnumeratePhysicalDeviceGroupsKHR | back to summary |
|---|---|
| public static int nvkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, long pPhysicalDeviceGroupCount, long pPhysicalDeviceGroupProperties) Unsafe version of:
| |
| vkEnumeratePhysicalDeviceGroupsKHR | back to summary |
|---|---|
| public static int vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, IntBuffer pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties. See
| |
| vkEnumeratePhysicalDeviceGroupsKHR | back to summary |
|---|---|
| public static int vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, int[] pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties. Array version of:
| |