A logical device is created as a connection to a physical device. To create a logical device, call:
// Provided by VK_VERSION_1_0 VkResult vkCreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice);
physicalDevicemust be one of the device handles returned from a call to
vkEnumeratePhysicalDevices(see Physical Device Enumeration).
pCreateInfois a pointer to a VkDeviceCreateInfo structure containing information about how to create the device.
pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
pDeviceis a pointer to a handle in which the created VkDevice is returned.
vkCreateDevice verifies that extensions and features requested in the
pEnabledFeatures members of
pCreateInfo, respectively, are supported by the implementation.
If any requested extension is not supported,
If any requested feature is not supported,
vkCreateDevice must return
Support for extensions can be checked before creating a device by querying
Support for features can similarly be checked by querying
After verifying and enabling the extensions the
VkDevice object is
created and returned to the application.
Multiple logical devices can be created from the same physical device.
Logical device creation may fail due to lack of device-specific resources
(in addition to other errors).
If that occurs,
vkCreateDevice will return
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.