Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_KHR_device_group_creation - instance extension
VK_KHR_device_group_creation
- Name String
VK_KHR_device_group_creation
- Extension Type
- Instance extension
- Registered Extension Number
- 71
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies; Deprecation State
- Promoted to Vulkan 1.1
- 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
Description
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.
New Commands
New Structures
New Enum Constants
KHR_DEVICE_GROUP_CREATION_SPEC_VERSION
MAX_DEVICE_GROUP_SIZE_KHR
Extending
MemoryHeapFlagBits
:Extending
StructureType
:
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);
Version History
Revision 1, 2016-10-19 (Jeff Bolz)
- Internal revisions
See Also
MAX_DEVICE_GROUP_SIZE_KHR
,
DeviceGroupDeviceCreateInfoKHR
, PhysicalDeviceGroupPropertiesKHR
,
enumeratePhysicalDeviceGroupsKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Documentation
pattern MAX_DEVICE_GROUP_SIZE_KHR :: Integral a => a Source #
enumeratePhysicalDeviceGroupsKHR :: MonadIO io => Instance -> io (Result, "physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties) Source #
pattern KHR_DEVICE_GROUP_CREATION_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME = "VK_KHR_device_group_creation" Source #
pattern KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #