# VkImageCreateInfo(3) Manual Page

## Name

VkImageCreateInfo - Structure specifying the parameters of a newly created image object

## C Specification

The `VkImageCreateInfo` structure is defined as:

    typedef struct VkImageCreateInfo {
        VkStructureType          sType;
        const void*              pNext;
        VkImageCreateFlags       flags;
        VkImageType              imageType;
        VkFormat                 format;
        VkExtent3D               extent;
        uint32_t                 mipLevels;
        uint32_t                 arrayLayers;
        VkSampleCountFlagBits    samples;
        VkImageTiling            tiling;
        VkImageUsageFlags        usage;
        VkSharingMode            sharingMode;
        uint32_t                 queueFamilyIndexCount;
        const uint32_t*          pQueueFamilyIndices;
        VkImageLayout            initialLayout;
    } VkImageCreateInfo;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `flags` is a bitmask of VkImageCreateFlagBits describing additional parameters of the image.

- `imageType` is a VkImageType value specifying the basic dimensionality of the image. Layers in array textures do not count as a dimension for the purposes of the image type.

- `format` is a VkFormat describing the format and type of the texel blocks that will be contained in the image.

- `extent` is a VkExtent3D describing the number of data elements in each dimension of the base level.

- `mipLevels` describes the number of levels of detail available for minified sampling of the image.

- `arrayLayers` is the number of layers in the image.

- `samples` is a VkSampleCountFlagBits specifying the number of samples per texel.

- `tiling` is a VkImageTiling value specifying the tiling arrangement of the texel blocks in memory.

- `usage` is a bitmask of VkImageUsageFlagBits describing the intended usage of the image.

- `sharingMode` is a VkSharingMode value specifying the sharing mode of the image when it will be accessed by multiple queue families.

- `queueFamilyIndexCount` is the number of entries in the `pQueueFamilyIndices` array.

- `pQueueFamilyIndices` is a list of queue families that will access this image (ignored if `sharingMode` is not `VK_SHARING_MODE_CONCURRENT`).

- `initialLayout` is a VkImageLayout value specifying the initial VkImageLayout of all image subresources of the image. See Image Layouts.

## Description

Images created with `tiling` equal to `VK_IMAGE_TILING_LINEAR` have further restrictions on their limits and capabilities compared to images created with `tiling` equal to `VK_IMAGE_TILING_OPTIMAL`. Creation of images with tiling `VK_IMAGE_TILING_LINEAR` may not be supported unless other parameters meet all of the constraints:

- `imageType` is `VK_IMAGE_TYPE_2D`

- `format` is not a depth/stencil format

- `mipLevels` is 1

- `arrayLayers` is 1

- `samples` is `VK_SAMPLE_COUNT_1_BIT`

- `usage` only includes `VK_IMAGE_USAGE_TRANSFER_SRC_BIT` and/or `VK_IMAGE_USAGE_TRANSFER_DST_BIT`

Images created with a `format` from one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion have further restrictions on their limits and capabilities compared to images created with other formats. Creation of images with a format requiring Y′CBCR conversion may not be supported unless other parameters meet all of the constraints:

- `imageType` is `VK_IMAGE_TYPE_2D`

- `mipLevels` is 1

- `arrayLayers` is 1

- `samples` is `VK_SAMPLE_COUNT_1_BIT`

Implementations may support additional limits and capabilities beyond those listed above.

To determine the set of valid `usage` bits for a given format, call vkGetPhysicalDeviceFormatProperties.

If the size of the resultant image would exceed `maxResourceSize`, then `vkCreateImage` must fail and return `VK_ERROR_OUT_OF_DEVICE_MEMORY`. This failure may occur even when all image creation parameters satisfy their valid usage requirements.

| Note For images created without `VK_IMAGE_CREATE_EXTENDED_USAGE_BIT` a `usage` bit is valid if it is supported for the format the image is created with. For images created with `VK_IMAGE_CREATE_EXTENDED_USAGE_BIT` a `usage` bit is valid if it is supported for at least one of the formats a `VkImageView` created from the image can have (see Image Views for more detail).

Image Creation Limits

Valid values for some image creation parameters are limited by a numerical upper bound or by inclusion in a bitset. For example, `VkImageCreateInfo`::`arrayLayers` is limited by `imageCreateMaxArrayLayers`, defined below; and `VkImageCreateInfo`::`samples` is limited by `imageCreateSampleCounts`, also defined below.

Several limiting values are defined below, as well as assisting values from which the limiting values are derived. The limiting values are referenced by the relevant valid usage statements of `VkImageCreateInfo`.

- Let `uint64_t imageCreateDrmFormatModifiers[]` be the set of Linux DRM format modifiers that the resultant image may have.

  - If `tiling` is not `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then `imageCreateDrmFormatModifiers` is empty.

  - If `VkImageCreateInfo`::`pNext` contains VkImageDrmFormatModifierExplicitCreateInfoEXT, then `imageCreateDrmFormatModifiers` contains exactly one modifier, `VkImageDrmFormatModifierExplicitCreateInfoEXT`::`drmFormatModifier`.

  - If `VkImageCreateInfo`::`pNext` contains VkImageDrmFormatModifierListCreateInfoEXT, then `imageCreateDrmFormatModifiers` contains the exactly the modifiers in `VkImageDrmFormatModifierListCreateInfoEXT`::`pDrmFormatModifiers`.

- Let `VkBool32 imageCreateMaybeLinear` indicate if the resultant image may be linear.

  - If `tiling` is `VK_IMAGE_TILING_LINEAR`, then `imageCreateMaybeLinear` is `true`.

  - If `tiling` is `VK_IMAGE_TILING_OPTIMAL`, then `imageCreateMaybeLinear` is `false`.

  - If `tiling` is `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then `imageCreateMaybeLinear_` is `true` if and only if `imageCreateDrmFormatModifiers` contains `DRM_FORMAT_MOD_LINEAR`.

- Let `VkFormatFeatureFlags imageCreateFormatFeatures` be the set of format features available during image creation.

  - If `tiling` is `VK_IMAGE_TILING_LINEAR`, then `imageCreateFormatFeatures` is the value of VkImageFormatProperties::`linearTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties with parameter `format` equal to `VkImageCreateInfo`::`format`.

  - If `tiling` is `VK_IMAGE_TILING_OPTIMAL`, and if the `pNext` chain includes no VkExternalFormatANDROID structure with non-zero `externalFormat`, then `imageCreateFormatFeatures` is value of VkImageFormatProperties::`optimalTilingFeatures` found by calling vkGetPhysicalDeviceFormatProperties with parameter `format` equal to `VkImageCreateInfo`::`format`.

  - If `tiling` is `VK_IMAGE_TILING_OPTIMAL`, and if the `pNext` chain includes a VkExternalFormatANDROID structure with non-zero `externalFormat`, then `imageCreateFormatFeatures` is the value of VkAndroidHardwareBufferFormatPropertiesANDROID::`formatFeatures` obtained by vkGetAndroidHardwareBufferPropertiesANDROID with a matching `externalFormat` value.

  - If `tiling` is `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then the value of `imageCreateFormatFeatures` is found by calling vkGetPhysicalDeviceFormatProperties2 with VkImageFormatProperties::`format` equal to `VkImageCreateInfo`::`format` and with VkDrmFormatModifierPropertiesListEXT chained into VkImageFormatProperties2; by collecting all members of the returned array VkDrmFormatModifierPropertiesListEXT::`pDrmFormatModifierProperties` whose `drmFormatModifier` belongs to `imageCreateDrmFormatModifiers`; and by taking the bitwise intersection, over the collected array members, of `drmFormatModifierTilingFeatures`. (The resultant `imageCreateFormatFeatures` may be empty).

- Let `VkImageFormatProperties2 imageCreateImageFormatPropertiesList[]` be defined as follows.

  - If `VkImageCreateInfo`::`pNext` contains no VkExternalFormatANDROID structure with non-zero `externalFormat`, then `imageCreateImageFormatPropertiesList` is the list of structures obtained by calling vkGetPhysicalDeviceImageFormatProperties2, possibly multiple times, as follows:

    - The parameters VkPhysicalDeviceImageFormatInfo2::`format`, `imageType`, `tiling`, `usage`, and `flags` must be equal to those in `VkImageCreateInfo`.

    - If VkImageCreateInfo::`pNext` contains a VkExternalMemoryImageCreateInfo structure whose `handleTypes` is not `0`, then VkPhysicalDeviceImageFormatInfo2::`pNext` must contain a VkPhysicalDeviceExternalImageFormatInfo structure whose `handleType` is not `0`; and vkGetPhysicalDeviceImageFormatProperties2 must be called for each handle type in VkExternalMemoryImageCreateInfo::`handleTypes`, successively setting VkPhysicalDeviceExternalImageFormatInfo::`handleType` on each call.

    - If VkImageCreateInfo::`pNext` contains no VkExternalMemoryImageCreateInfo structure, or contains a structure whose `handleTypes` is `0`, then VkPhysicalDeviceImageFormatInfo2::`pNext` must either contain no VkPhysicalDeviceExternalImageFormatInfo structure, or contain a structure whose `handleType` is `0`.

    - If `tiling` is `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then VkPhysicalDeviceImageFormatInfo2::`pNext` must contain a VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure where `sharingMode` is equal to VkImageCreateInfo::`sharingMode`; and, if `sharingMode` is `VK_SHARING_MODE_CONCURRENT`, then `queueFamilyIndexCount` and `pQueueFamilyIndices` must be equal to those in VkImageCreateInfo; and, if `flags` contains `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`, then the VkImageFormatListCreateInfo structure included in the `pNext` chain of VkPhysicalDeviceImageFormatInfo2 must be equivalent to the one included in the `pNext` chain of VkImageCreateInfo; and vkGetPhysicalDeviceImageFormatProperties2 must be called for each modifier in `imageCreateDrmFormatModifiers`, successively setting VkPhysicalDeviceImageDrmFormatModifierInfoEXT::`drmFormatModifier` on each call.

    - If `tiling` is not `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then VkPhysicalDeviceImageFormatInfo2::`pNext` must contain no VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure.

    - If any call to vkGetPhysicalDeviceImageFormatProperties2 returns an error, then `imageCreateImageFormatPropertiesList` is defined to be the empty list.

  - If `VkImageCreateInfo`::`pNext` contains a VkExternalFormatANDROID structure with non-zero `externalFormat`, then `imageCreateImageFormatPropertiesList` contains a single element where:

    - `VkImageFormatProperties`::`maxMipLevels` is ⌊log2(max(`extent.width`, `extent.height`, `extent.depth`))⌋ + 1.

    - `VkImageFormatProperties`::`maxArrayLayers` is VkPhysicalDeviceLimits::maxImageArrayLayers.

    - Each component of `VkImageFormatProperties`::`maxExtent` is VkPhysicalDeviceLimits::maxImageDimension2D.

    - `VkImageFormatProperties`::`sampleCounts` contains exactly `VK_SAMPLE_COUNT_1_BIT`.

- Let `uint32_t imageCreateMaxMipLevels` be the minimum value of VkImageFormatProperties::`maxMipLevels` in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `uint32_t imageCreateMaxArrayLayers` be the minimum value of VkImageFormatProperties::`maxArrayLayers` in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `VkExtent3D imageCreateMaxExtent` be the component-wise minimum over all VkImageFormatProperties::`maxExtent` values in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

- Let `VkSampleCountFlags imageCreateSampleCounts` be the intersection of each VkImageFormatProperties::`sampleCounts` in `imageCreateImageFormatPropertiesList`. The value is undefined if `imageCreateImageFormatPropertiesList` is empty.

Valid Usage

- Each of the following values (as described in Image Creation Limits) must not be undefined `imageCreateMaxMipLevels`, `imageCreateMaxArrayLayers`, `imageCreateMaxExtent`, and `imageCreateSampleCounts`.

- If `sharingMode` is `VK_SHARING_MODE_CONCURRENT`, `pQueueFamilyIndices` must be a valid pointer to an array of `queueFamilyIndexCount` `uint32_t` values

- If `sharingMode` is `VK_SHARING_MODE_CONCURRENT`, `queueFamilyIndexCount` must be greater than `1`

- If `sharingMode` is `VK_SHARING_MODE_CONCURRENT`, each element of `pQueueFamilyIndices` must be unique and must be less than `pQueueFamilyPropertyCount` returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2 for the `physicalDevice` that was used to create `device`

- If the `pNext` chain includes a VkExternalFormatANDROID structure, and its `externalFormat` member is non-zero the `format` must be `VK_FORMAT_UNDEFINED`.

- If the `pNext` chain does not include a VkExternalFormatANDROID structure, or does and its `externalFormat` member is `0`, the `format` must not be `VK_FORMAT_UNDEFINED`.

- `extent.width` must be greater than `0`.

- `extent.height` must be greater than `0`.

- `extent.depth` must be greater than `0`.

- `mipLevels` must be greater than `0`

- `arrayLayers` must be greater than `0`

- If `flags` contains `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT`, `imageType` must be `VK_IMAGE_TYPE_2D`

- If `flags` contains `VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT`, `imageType` must be `VK_IMAGE_TYPE_2D`

- If `flags` contains `VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT`, `imageType` must be `VK_IMAGE_TYPE_3D`

- `extent.width` must be less than or equal to `imageCreateMaxExtent.width` (as defined in Image Creation Limits).

- `extent.height` must be less than or equal to `imageCreateMaxExtent.height` (as defined in Image Creation Limits).

- `extent.depth` must be less than or equal to `imageCreateMaxExtent.depth` (as defined in Image Creation Limits).

- If `imageType` is `VK_IMAGE_TYPE_2D` and `flags` contains `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT`, `extent.width` and `extent.height` must be equal and `arrayLayers` must be greater than or equal to 6

- If `imageType` is `VK_IMAGE_TYPE_1D`, both `extent.height` and `extent.depth` must be `1`

- If `imageType` is `VK_IMAGE_TYPE_2D`, `extent.depth` must be `1`

- `mipLevels` must be less than or equal to the number of levels in the complete mipmap chain based on `extent.width`, `extent.height`, and `extent.depth`.

- `mipLevels` must be less than or equal to `imageCreateMaxMipLevels` (as defined in Image Creation Limits).

- `arrayLayers` must be less than or equal to `imageCreateMaxArrayLayers` (as defined in Image Creation Limits).

- If `imageType` is `VK_IMAGE_TYPE_3D`, `arrayLayers` must be `1`.

- If `samples` is not `VK_SAMPLE_COUNT_1_BIT`, then `imageType` must be `VK_IMAGE_TYPE_2D`, `flags` must not contain `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT`, `mipLevels` must be equal to `1`, and `imageCreateMaybeLinear` (as defined in Image Creation Limits) must be `false`,

- If `samples` is not `VK_SAMPLE_COUNT_1_BIT`, `usage` must not contain `VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT`

- If `usage` includes `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`, then bits other than `VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT`, `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`, and `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT` must not be set

- If `usage` includes `VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT`, `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`, `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`, or `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT`, `extent.width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferWidth`

- If `usage` includes `VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT`, `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`, `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`, or `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT`, `extent.height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferHeight`

- If `usage` includes `VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT`, `extent.width` must be less than or equal to \(\lceil{\frac{maxFramebufferWidth}{minFragmentDensityTexelSize_{width}}}\rceil\)

- If `usage` includes `VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT`, `extent.height` must be less than or equal to \(\lceil{\frac{maxFramebufferHeight}{minFragmentDensityTexelSize_{height}}}\rceil\)

- If `usage` includes `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`, `usage` must also contain at least one of `VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT`, `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`, or `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT`.

- `samples` must be a bit value that is set in `imageCreateSampleCounts` (as defined in Image Creation Limits).

- If the multisampled storage images feature is not enabled, and `usage` contains `VK_IMAGE_USAGE_STORAGE_BIT`, `samples` must be `VK_SAMPLE_COUNT_1_BIT`

- If the sparse bindings feature is not enabled, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_BINDING_BIT`

- If the sparse aliased residency feature is not enabled, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_ALIASED_BIT`

- If `imageType` is `VK_IMAGE_TYPE_1D`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If the sparse residency for 2D images feature is not enabled, and `imageType` is `VK_IMAGE_TYPE_2D`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If the sparse residency for 3D images feature is not enabled, and `imageType` is `VK_IMAGE_TYPE_3D`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If the sparse residency for images with 2 samples feature is not enabled, `imageType` is `VK_IMAGE_TYPE_2D`, and `samples` is `VK_SAMPLE_COUNT_2_BIT`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If the sparse residency for images with 4 samples feature is not enabled, `imageType` is `VK_IMAGE_TYPE_2D`, and `samples` is `VK_SAMPLE_COUNT_4_BIT`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If the sparse residency for images with 8 samples feature is not enabled, `imageType` is `VK_IMAGE_TYPE_2D`, and `samples` is `VK_SAMPLE_COUNT_8_BIT`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If the sparse residency for images with 16 samples feature is not enabled, `imageType` is `VK_IMAGE_TYPE_2D`, and `samples` is `VK_SAMPLE_COUNT_16_BIT`, `flags` must not contain `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`

- If `flags` contains `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT` or `VK_IMAGE_CREATE_SPARSE_ALIASED_BIT`, it must also contain `VK_IMAGE_CREATE_SPARSE_BINDING_BIT`

- If any of the bits `VK_IMAGE_CREATE_SPARSE_BINDING_BIT`, `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`, or `VK_IMAGE_CREATE_SPARSE_ALIASED_BIT` are set, `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT` must not also be set

- If the protected memory feature is not enabled, `flags` must not contain `VK_IMAGE_CREATE_PROTECTED_BIT`.

- If any of the bits `VK_IMAGE_CREATE_SPARSE_BINDING_BIT`, `VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT`, or `VK_IMAGE_CREATE_SPARSE_ALIASED_BIT` are set, `VK_IMAGE_CREATE_PROTECTED_BIT` must not also be set.

- If the `pNext` chain includes a VkExternalMemoryImageCreateInfoNV structure, it must not contain a VkExternalMemoryImageCreateInfo structure.

- If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure, its `handleTypes` member must only contain bits that are also in VkExternalImageFormatProperties::`externalMemoryProperties.compatibleHandleTypes`, as returned by vkGetPhysicalDeviceImageFormatProperties2 with `format`, `imageType`, `tiling`, `usage`, and `flags` equal to those in this structure, and with a VkPhysicalDeviceExternalImageFormatInfo structure included in the `pNext` chain, with a `handleType` equal to any one of the handle types specified in VkExternalMemoryImageCreateInfo::`handleTypes`

- If the `pNext` chain includes a VkExternalMemoryImageCreateInfoNV structure, its `handleTypes` member must only contain bits that are also in VkExternalImageFormatPropertiesNV::`externalMemoryProperties.compatibleHandleTypes`, as returned by vkGetPhysicalDeviceExternalImageFormatPropertiesNV with `format`, `imageType`, `tiling`, `usage`, and `flags` equal to those in this structure, and with `externalHandleType` equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoNV::`handleTypes`

- If the logical device was created with VkDeviceGroupDeviceCreateInfo::`physicalDeviceCount` equal to 1, `flags` must not contain `VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT`

- If `flags` contains `VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT`, then `mipLevels` must be one, `arrayLayers` must be one, `imageType` must be `VK_IMAGE_TYPE_2D`. and `imageCreateMaybeLinear` (as defined in Image Creation Limits) must be `false`.

- If `flags` contains `VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT`, then `format` must be a block-compressed image format, an ETC compressed image format, or an ASTC compressed image format.

- If `flags` contains `VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT`, then `flags` must also contain `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`.

- `initialLayout` must be `VK_IMAGE_LAYOUT_UNDEFINED` or `VK_IMAGE_LAYOUT_PREINITIALIZED`.

- If the `pNext` chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose `handleTypes` member is not `0`, `initialLayout` must be `VK_IMAGE_LAYOUT_UNDEFINED`

- If the image `format` is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, then `mipLevels` must be 1

- If the image `format` is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, `samples` must be `VK_SAMPLE_COUNT_1_BIT`

- If the image `format` is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, `imageType` must be `VK_IMAGE_TYPE_2D`

- If the image `format` is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, and the `ycbcrImageArrays` feature is not enabled, `arrayLayers` must be 1

- If `format` is a multi-planar format, and if `imageCreateFormatFeatures` (as defined in Image Creation Limits) does not contain `VK_FORMAT_FEATURE_DISJOINT_BIT`, then `flags` must not contain `VK_IMAGE_CREATE_DISJOINT_BIT`

- If `format` is not a multi-planar format, and `flags` does not include `VK_IMAGE_CREATE_ALIAS_BIT`, `flags` must not contain `VK_IMAGE_CREATE_DISJOINT_BIT`

- If `tiling` is `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then the `pNext` chain must include exactly one of VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT structures

- If the `pNext` chain includes a VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT structure, then `tiling` must be `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`

- If `tiling` is `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT` and `flags` contains `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`, then the `pNext` chain must include a VkImageFormatListCreateInfo structure with non-zero `viewFormatCount`.

- If `flags` contains `VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT` `format` must be a depth or depth/stencil format

- If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure whose `handleTypes` member includes `VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID`, `imageType` must be `VK_IMAGE_TYPE_2D`.

- If the `pNext` chain includes a VkExternalMemoryImageCreateInfo structure whose `handleTypes` member includes `VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID`, `mipLevels` must either be `1` or equal to the number of levels in the complete mipmap chain based on `extent.width`, `extent.height`, and `extent.depth`.

- If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, `flags` must not include `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`.

- If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, `usage` must not include any usages except `VK_IMAGE_USAGE_SAMPLED_BIT`.

- If the `pNext` chain includes a VkExternalFormatANDROID structure whose `externalFormat` member is not `0`, `tiling` must be `VK_IMAGE_TILING_OPTIMAL`.

- If `format` is a depth-stencil format, `usage` includes `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also include `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`

- If `format` is a depth-stencil format, `usage` does not include `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also not include `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT`

- If `format` is a depth-stencil format, `usage` includes `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also include `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`

- If `format` is a depth-stencil format, `usage` does not include `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`, and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::`stencilUsage` member must also not include `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`

- If `Format` is a depth-stencil format and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure with its `stencilUsage` member including `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT`, `extent.width` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferWidth`

- If `format` is a depth-stencil format and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure with its `stencilUsage` member including `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT`, `extent.height` must be less than or equal to `VkPhysicalDeviceLimits`::`maxFramebufferHeight`

- If the multisampled storage images feature is not enabled, `format` is a depth-stencil format and the `pNext` chain includes a VkImageStencilUsageCreateInfo structure with its `stencilUsage` including `VK_IMAGE_USAGE_STORAGE_BIT`, `samples` must be `VK_SAMPLE_COUNT_1_BIT`

- If `flags` contains `VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV`, `imageType` must be `VK_IMAGE_TYPE_2D` or `VK_IMAGE_TYPE_3D`

- If `flags` contains `VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV`, it must not contain `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT` and the `format` must not be a depth/stencil format

- If `flags` contains `VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV` and `imageType` is `VK_IMAGE_TYPE_2D`, `extent.width` and `extent.height` must be greater than `1`

- If `flags` contains `VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV` and `imageType` is `VK_IMAGE_TYPE_3D`, `extent.width`, `extent.height`, and `extent.depth` must be greater than `1`

- If `usage` includes `VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV`, `imageType` must be `VK_IMAGE_TYPE_2D`.

- If `usage` includes `VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV`, `samples` must be `VK_SAMPLE_COUNT_1_BIT`.

- If `usage` includes `VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV`, `tiling` must be `VK_IMAGE_TILING_OPTIMAL`.

- If `flags` contains `VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT`, `tiling` must be `VK_IMAGE_TILING_OPTIMAL`

- If `flags` contains `VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT`, `imageType` must be `VK_IMAGE_TYPE_2D`

- If `flags` contains `VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT`, `flags` must not contain `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT`

- If `flags` contains `VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT`, `mipLevels` must be `1`

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO`

- 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 VkDedicatedAllocationImageCreateInfoNV, VkExternalFormatANDROID, VkExternalMemoryImageCreateInfo, VkExternalMemoryImageCreateInfoNV, VkImageDrmFormatModifierExplicitCreateInfoEXT, VkImageDrmFormatModifierListCreateInfoEXT, VkImageFormatListCreateInfo, VkImageStencilUsageCreateInfo, or VkImageSwapchainCreateInfoKHR

- The `sType` value of each struct in the `pNext` chain must be unique

- `flags` must be a valid combination of VkImageCreateFlagBits values

- `imageType` must be a valid VkImageType value

- `format` must be a valid VkFormat value

- `samples` must be a valid VkSampleCountFlagBits value

- `tiling` must be a valid VkImageTiling value

- `usage` must be a valid combination of VkImageUsageFlagBits values

- `usage` must not be `0`

- `sharingMode` must be a valid VkSharingMode value

- `initialLayout` must be a valid VkImageLayout value

## See Also

VkExtent3D, VkFormat, VkImageCreateFlags, VkImageLayout, VkImageTiling, VkImageType, VkImageUsageFlags, VkSampleCountFlagBits, VkSharingMode, VkStructureType, vkCreateImage

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.