public class KHRDeviceGroupCreation
extends java.lang.Object
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 |
|---|---|
static java.lang.String |
VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME
The extension name.
|
static int |
VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION
The extension specification version.
|
static int |
VK_MAX_DEVICE_GROUP_SIZE_KHR
VK_MAX_DEVICE_GROUP_SIZE_KHR
|
static int |
VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR
Extends
VkMemoryHeapFlagBits. |
static int |
VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static int |
nvkEnumeratePhysicalDeviceGroupsKHR(org.lwjgl.vulkan.VkInstance instance,
long pPhysicalDeviceGroupCount,
long pPhysicalDeviceGroupProperties)
Unsafe version of:
EnumeratePhysicalDeviceGroupsKHR |
static int |
vkEnumeratePhysicalDeviceGroupsKHR(org.lwjgl.vulkan.VkInstance instance,
int[] pPhysicalDeviceGroupCount,
VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)
Array version of:
EnumeratePhysicalDeviceGroupsKHR |
static int |
vkEnumeratePhysicalDeviceGroupsKHR(org.lwjgl.vulkan.VkInstance instance,
java.nio.IntBuffer pPhysicalDeviceGroupCount,
VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)
|
public static final int VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION
public static final java.lang.String VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR
VkStructureType.
public static final int VK_MAX_DEVICE_GROUP_SIZE_KHR
public static final int VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR
VkMemoryHeapFlagBits.public static int nvkEnumeratePhysicalDeviceGroupsKHR(org.lwjgl.vulkan.VkInstance instance,
long pPhysicalDeviceGroupCount,
long pPhysicalDeviceGroupProperties)
EnumeratePhysicalDeviceGroupsKHRpPhysicalDeviceGroupCount - a pointer to an integer related to the number of device groups available or queried, as described below.public static int vkEnumeratePhysicalDeviceGroupsKHR(org.lwjgl.vulkan.VkInstance instance,
java.nio.IntBuffer pPhysicalDeviceGroupCount,
@Nullable
VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)
instance - a handle to a Vulkan instance previously created with CreateInstance.pPhysicalDeviceGroupCount - a pointer to an integer related to the number of device groups available or queried, as described below.pPhysicalDeviceGroupProperties - either NULL or a pointer to an array of VkPhysicalDeviceGroupProperties structures.public static int vkEnumeratePhysicalDeviceGroupsKHR(org.lwjgl.vulkan.VkInstance instance,
int[] pPhysicalDeviceGroupCount,
@Nullable
VkPhysicalDeviceGroupProperties.Buffer pPhysicalDeviceGroupProperties)
EnumeratePhysicalDeviceGroupsKHRCopyright LWJGL. All Rights Reserved. License terms.