A logical device is created as a connection to a physical device. To create a logical device, call:
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.
If a requested extension is only supported by a layer, both the layer and
the extension need to be specified at
vkCreateInstance time for the
creation to succeed.
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 the 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.
Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.