Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class KHRDeviceGroupCreation

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

This extension provides instance-level commands to enumerate groups of physical devices, and to create a logical device from a subset of one of those groups. Such a logical device can then be used with new features in the VK_KHR_device_group extension.
Promotion to Vulkan 1.1

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.

Examples

    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
Name String
VK_KHR_device_group_creation
Extension Type
Instance extension
Registered Extension Number
71
Revision
1
Deprecation state
Contact
Other Extension Metadata
Last Modified Date
2016-10-19
IP Status
No known IP claims.
Interactions and External Dependencies
  • Promoted to Vulkan 1.1 Core
Contributors
  • Jeff Bolz, NVIDIA

Field Summary

Modifier and TypeField and Description
public static final String
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 VkMemoryHeapFlagBits.

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod 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: EnumeratePhysicalDeviceGroupsKHR

public static int
vkEnumeratePhysicalDeviceGroupsKHR(VkInstance
a handle to a Vulkan instance previously created with CreateInstance.
instance
,
IntBuffer
a pointer to an integer related to the number of device groups available or queried, as described below.
pPhysicalDeviceGroupCount
,
VkPhysicalDeviceGroupProperties.Buffer
either NULL or a pointer to an array of VkPhysicalDeviceGroupProperties structures.
pPhysicalDeviceGroupProperties
)

See EnumeratePhysicalDeviceGroups.

public static int
vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, int[] pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)

Array version of: EnumeratePhysicalDeviceGroupsKHR

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAMEback to summary
public static final String VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME

The extension name.

VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSIONback to summary
public static final int VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION

The extension specification version.

VK_MAX_DEVICE_GROUP_SIZE_KHRback to summary
public static final int VK_MAX_DEVICE_GROUP_SIZE_KHR

VK_MAX_DEVICE_GROUP_SIZE_KHR

VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHRback to summary
public static final int VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR

Extends VkMemoryHeapFlagBits.

VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHRback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR

Extends VkStructureType.

Enum values:

Constructor Detail

KHRDeviceGroupCreationback to summary
protected KHRDeviceGroupCreation()

Method Detail

nvkEnumeratePhysicalDeviceGroupsKHRback to summary
public static int nvkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, long pPhysicalDeviceGroupCount, long pPhysicalDeviceGroupProperties)

Unsafe version of: EnumeratePhysicalDeviceGroupsKHR

Parameters
pPhysicalDeviceGroupCount:long

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

vkEnumeratePhysicalDeviceGroupsKHRback to summary
public static int vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, IntBuffer pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)

See EnumeratePhysicalDeviceGroups.

Parameters
instance:VkInstance

a handle to a Vulkan instance previously created with CreateInstance.

pPhysicalDeviceGroupCount:IntBuffer

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

pPhysicalDeviceGroupProperties:VkPhysicalDeviceGroupProperties.Buffer

either NULL or a pointer to an array of VkPhysicalDeviceGroupProperties structures.

Annotations
@NativeType:VkResult
vkEnumeratePhysicalDeviceGroupsKHRback to summary
public static int vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, int[] pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)

Array version of: EnumeratePhysicalDeviceGroupsKHR

Annotations
@NativeType:VkResult