VkDeviceCreateInfo(3)

# VkDeviceCreateInfo(3) Manual Page

## Name

VkDeviceCreateInfo - Structure specifying parameters of a newly created device

Loading… please wait.

## C Specification

The `VkDeviceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkDeviceCreateInfo {
        VkStructureType                    sType;
        const void*                        pNext;
        VkDeviceCreateFlags                flags;
        uint32_t                           queueCreateInfoCount;
        const VkDeviceQueueCreateInfo*     pQueueCreateInfos;
        uint32_t                           enabledLayerCount;
        const char* const*                 ppEnabledLayerNames;
        uint32_t                           enabledExtensionCount;
        const char* const*                 ppEnabledExtensionNames;
        const VkPhysicalDeviceFeatures*    pEnabledFeatures;
    } VkDeviceCreateInfo;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `queueCreateInfoCount` is the unsigned integer size of the `pQueueCreateInfos` array. Refer to the Queue Creation section below for further details.

- `pQueueCreateInfos` is a pointer to an array of VkDeviceQueueCreateInfo structures describing the queues that are requested to be created along with the logical device. Refer to the Queue Creation section below for further details.

- `enabledLayerCount` is deprecated and ignored.

- `ppEnabledLayerNames` is deprecated and ignored. See https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation.

- `enabledExtensionCount` is the number of device extensions to enable.

- `ppEnabledExtensionNames` is a pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings containing the names of extensions to enable for the created device. See the https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-extensions section for further details.

- `pEnabledFeatures` is `NULL` or a pointer to a VkPhysicalDeviceFeatures structure containing boolean indicators of all the features to be enabled. Refer to the Features section for further details.

## Description

Valid Usage

- VUID-VkDeviceCreateInfo-queueFamilyIndex-02802
  The `queueFamilyIndex` member of each element of `pQueueCreateInfos` must be unique within `pQueueCreateInfos`, except that two members can share the same `queueFamilyIndex` if one is a protected-capable queue and one is not a protected-capable queue

- VUID-VkDeviceCreateInfo-pNext-00373
  If the `pNext` chain includes a VkPhysicalDeviceFeatures2 structure, then `pEnabledFeatures` must be `NULL`

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-01840
  `ppEnabledExtensionNames` must not contain `VK_AMD_negative_viewport_height`

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-03328
  `ppEnabledExtensionNames` must not contain both `VK_KHR_buffer_device_address` and `VK_EXT_buffer_device_address`

- VUID-VkDeviceCreateInfo-pNext-04748
  if the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure and VkPhysicalDeviceVulkan12Features::`bufferDeviceAddress` is VK_TRUE, `ppEnabledExtensionNames` must not contain `VK_EXT_buffer_device_address`

- VUID-VkDeviceCreateInfo-pNext-02829
  If the `pNext` chain includes a VkPhysicalDeviceVulkan11Features structure, then it must not include a VkPhysicalDevice16BitStorageFeatures, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceSamplerYcbcrConversionFeatures, or VkPhysicalDeviceShaderDrawParametersFeatures structure

- VUID-VkDeviceCreateInfo-pNext-02830
  If the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then it must not include a VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceBufferDeviceAddressFeatures, or VkPhysicalDeviceVulkanMemoryModelFeatures structure

- VUID-VkDeviceCreateInfo-ppEnabledExtensions-04476
  If `ppEnabledExtensions` contains `"VK_KHR_shader_draw_parameters"` and the `pNext` chain includes a VkPhysicalDeviceVulkan11Features structure, then `VkPhysicalDeviceVulkan11Features`::`shaderDrawParameters` must be `VK_TRUE`

- VUID-VkDeviceCreateInfo-ppEnabledExtensions-02831
  If `ppEnabledExtensions` contains `"VK_KHR_draw_indirect_count"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`drawIndirectCount` must be `VK_TRUE`

- VUID-VkDeviceCreateInfo-ppEnabledExtensions-02832
  If `ppEnabledExtensions` contains `"VK_KHR_sampler_mirror_clamp_to_edge"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`samplerMirrorClampToEdge` must be `VK_TRUE`

- VUID-VkDeviceCreateInfo-ppEnabledExtensions-02833
  If `ppEnabledExtensions` contains `"VK_EXT_descriptor_indexing"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`descriptorIndexing` must be `VK_TRUE`

- VUID-VkDeviceCreateInfo-ppEnabledExtensions-02834
  If `ppEnabledExtensions` contains `"VK_EXT_sampler_filter_minmax"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`samplerFilterMinmax` must be `VK_TRUE`

- VUID-VkDeviceCreateInfo-ppEnabledExtensions-02835
  If `ppEnabledExtensions` contains `"VK_EXT_shader_viewport_index_layer"` and the `pNext` chain includes a VkPhysicalDeviceVulkan12Features structure, then `VkPhysicalDeviceVulkan12Features`::`shaderOutputViewportIndex` and `VkPhysicalDeviceVulkan12Features`::`shaderOutputLayer` must both be `VK_TRUE`

- VUID-VkDeviceCreateInfo-pProperties-04451
  If the `VK_KHR_portability_subset` extension is included in `pProperties` of vkEnumerateDeviceExtensionProperties, `ppEnabledExtensions` must include "VK_KHR_portability_subset".

- VUID-VkDeviceCreateInfo-shadingRateImage-04478
  If `shadingRateImage` is enabled, `pipelineFragmentShadingRate` must not be enabled

- VUID-VkDeviceCreateInfo-shadingRateImage-04479
  If `shadingRateImage` is enabled, `primitiveFragmentShadingRate` must not be enabled

- VUID-VkDeviceCreateInfo-shadingRateImage-04480
  If `shadingRateImage` is enabled, `attachmentFragmentShadingRate` must not be enabled

- VUID-VkDeviceCreateInfo-fragmentDensityMap-04481
  If `fragmentDensityMap` is enabled, `pipelineFragmentShadingRate` must not be enabled

- VUID-VkDeviceCreateInfo-fragmentDensityMap-04482
  If `fragmentDensityMap` is enabled, `primitiveFragmentShadingRate` must not be enabled

- VUID-VkDeviceCreateInfo-fragmentDensityMap-04483
  If `fragmentDensityMap` is enabled, `attachmentFragmentShadingRate` must not be enabled

Valid Usage (Implicit)

- VUID-VkDeviceCreateInfo-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO`

- VUID-VkDeviceCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDeviceDeviceMemoryReportCreateInfoEXT, VkDeviceDiagnosticsConfigCreateInfoNV, VkDeviceGroupDeviceCreateInfo, VkDeviceMemoryOverallocationCreateInfoAMD, VkDevicePrivateDataCreateInfoEXT, VkPhysicalDevice16BitStorageFeatures, VkPhysicalDevice4444FormatsFeaturesEXT, VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceASTCDecodeFeaturesEXT, VkPhysicalDeviceAccelerationStructureFeaturesKHR, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceBufferDeviceAddressFeatures, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT, VkPhysicalDeviceCoherentMemoryFeaturesAMD, VkPhysicalDeviceColorWriteEnableFeaturesEXT, VkPhysicalDeviceComputeShaderDerivativesFeaturesNV, VkPhysicalDeviceConditionalRenderingFeaturesEXT, VkPhysicalDeviceCooperativeMatrixFeaturesNV, VkPhysicalDeviceCornerSampledImageFeaturesNV, VkPhysicalDeviceCoverageReductionModeFeaturesNV, VkPhysicalDeviceCustomBorderColorFeaturesEXT, VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, VkPhysicalDeviceDepthClipEnableFeaturesEXT, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV, VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, VkPhysicalDeviceDiagnosticsConfigFeaturesNV, VkPhysicalDeviceExclusiveScissorFeaturesNV, VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, VkPhysicalDeviceFeatures2, VkPhysicalDeviceFragmentDensityMap2FeaturesEXT, VkPhysicalDeviceFragmentDensityMapFeaturesEXT, VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV, VkPhysicalDeviceFragmentShadingRateFeaturesKHR, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceImageRobustnessFeaturesEXT, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceIndexTypeUint8FeaturesEXT, VkPhysicalDeviceInheritedViewportScissorFeaturesNV, VkPhysicalDeviceInlineUniformBlockFeaturesEXT, VkPhysicalDeviceLineRasterizationFeaturesEXT, VkPhysicalDeviceMemoryPriorityFeaturesEXT, VkPhysicalDeviceMeshShaderFeaturesNV, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE, VkPhysicalDevicePerformanceQueryFeaturesKHR, VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT, VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR, VkPhysicalDevicePortabilitySubsetFeaturesKHR, VkPhysicalDevicePrivateDataFeaturesEXT, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceRayQueryFeaturesKHR, VkPhysicalDeviceRayTracingPipelineFeaturesKHR, VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV, VkPhysicalDeviceRobustness2FeaturesEXT, VkPhysicalDeviceSamplerYcbcrConversionFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderClockFeaturesKHR, VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, VkPhysicalDeviceShaderDrawParametersFeatures, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT, VkPhysicalDeviceShaderImageFootprintFeaturesNV, VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, VkPhysicalDeviceShaderSMBuiltinsFeaturesNV, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR, VkPhysicalDeviceShadingRateImageFeaturesNV, VkPhysicalDeviceSubgroupSizeControlFeaturesEXT, VkPhysicalDeviceSynchronization2FeaturesKHR, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT, VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceTransformFeedbackFeaturesEXT, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT, VkPhysicalDeviceVulkan11Features, VkPhysicalDeviceVulkan12Features, VkPhysicalDeviceVulkanMemoryModelFeatures, VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT, or VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR

- VUID-VkDeviceCreateInfo-sType-unique
  The `sType` value of each struct in the `pNext` chain must be unique, with the exception of structures of type VkDeviceDeviceMemoryReportCreateInfoEXT or VkDevicePrivateDataCreateInfoEXT

- VUID-VkDeviceCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter
  `pQueueCreateInfos` must be a valid pointer to an array of `queueCreateInfoCount` valid VkDeviceQueueCreateInfo structures

- VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter
  If `enabledLayerCount` is not `0`, `ppEnabledLayerNames` must be a valid pointer to an array of `enabledLayerCount` null-terminated UTF-8 strings

- VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter
  If `enabledExtensionCount` is not `0`, `ppEnabledExtensionNames` must be a valid pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings

- VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter
  If `pEnabledFeatures` is not `NULL`, `pEnabledFeatures` must be a valid pointer to a valid VkPhysicalDeviceFeatures structure

- VUID-VkDeviceCreateInfo-queueCreateInfoCount-arraylength
  `queueCreateInfoCount` must be greater than `0`

## See Also

VkDeviceCreateFlags, VkDeviceQueueCreateInfo, VkPhysicalDeviceFeatures, VkStructureType, vkCreateDevice

## Document Notes

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

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0