# VkImageViewCreateInfo(3) Manual Page

## Name

VkImageViewCreateInfo - Structure specifying parameters of a newly created image view

Loading… please wait.

## C Specification

The `VkImageViewCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkImageViewCreateInfo {
        VkStructureType            sType;
        const void*                pNext;
        VkImageViewCreateFlags     flags;
        VkImage                    image;
        VkImageViewType            viewType;
        VkFormat                   format;
        VkComponentMapping         components;
        VkImageSubresourceRange    subresourceRange;
    } VkImageViewCreateInfo;

## Members

- `sType` is a VkStructureType value identifying this structure.

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

- `flags` is a bitmask of VkImageViewCreateFlagBits specifying additional parameters of the image view.

- `image` is a VkImage on which the view will be created.

- `viewType` is a VkImageViewType value specifying the type of the image view.

- `format` is a VkFormat specifying the format and type used to interpret texel blocks of the image.

- `components` is a VkComponentMapping structure specifying a remapping of color components (or of depth or stencil components after they have been converted into color components).

- `subresourceRange` is a VkImageSubresourceRange structure selecting the set of mipmap levels and array layers to be accessible to the view.

## Description

Some of the `image` creation parameters are inherited by the view. In particular, image view creation inherits the implicit parameter `usage` specifying the allowed usages of the image view that, by default, takes the value of the corresponding `usage` parameter specified in VkImageCreateInfo at image creation time. The implicit `usage` can be overridden by adding a VkImageViewUsageCreateInfo structure to the `pNext` chain, but the view usage must be a subset of the image usage. If `image` has a depth-stencil format and was created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, the usage is calculated based on the `subresource.aspectMask` provided:

- If `aspectMask` includes only VK_IMAGE_ASPECT_STENCIL_BIT, the implicit `usage` is equal to VkImageStencilUsageCreateInfo::`stencilUsage`.

- If `aspectMask` includes only VK_IMAGE_ASPECT_DEPTH_BIT, the implicit `usage` is equal to VkImageCreateInfo::`usage`.

- If both aspects are included in `aspectMask`, the implicit `usage` is equal to the intersection of VkImageCreateInfo::`usage` and VkImageStencilUsageCreateInfo::`stencilUsage`.

If `image` is a 3D image, its Z range can be restricted to a subset by adding a VkImageViewSlicedCreateInfoEXT to the `pNext` chain.

If `image`’s format is multi-planar and `aspectMask` is one of VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or VK_IMAGE_ASPECT_PLANE_2_BIT, the view format is the compatible format for the plane. Otherwise the view format is the `format` used to create `image`.

If `image` was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, `format` can be set to a format that is compatible with the view format. If the image was not created with VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, `format` must equal the view format.

When creating a single-plane view of a multi-planar image, `width` and `height` must be derived from the multi-planar image’s dimensions in the manner listed for plane compatibility for the plane.

Views of compatible formats will have the same mapping between texel coordinates and memory locations irrespective of the `format`, with only the interpretation of the bit pattern changing.

If `image` was created with a multi-planar format, and the image view’s `aspectMask` is one of VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT or VK_IMAGE_ASPECT_PLANE_2_BIT, the view’s aspect mask is considered to be equivalent to VK_IMAGE_ASPECT_COLOR_BIT when used as a framebuffer attachment.

Note | Values intended to be used with one view format may not be exactly preserved when written or read through a different format. For example, an integer value that happens to have the bit pattern of a floating-point denorm or NaN may be flushed or canonicalized when written or read through a view with a floating-point format. Similarly, a value written through a signed normalized format that has a bit pattern exactly equal to -2b may be changed to -2b + 1 as described in Conversion from Normalized Fixed-Point to Floating-Point.

If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, `format` must be compatible with the image’s format as described above; or must be an uncompressed format, in which case it must be size-compatible with the image’s format. In this case, the resulting image view’s texel dimensions equal the dimensions of the selected mip level divided by the compressed texel block size and rounded up.

The VkComponentMapping `components` member describes a remapping from components of the image to components of the vector returned by shader image instructions. This remapping must be the identity swizzle for any `VkImageView` used with a combined image sampler that enables sampler Y′CBCR conversion, input attachment descriptors, framebuffer attachments, and storage image descriptors.

Image views with formats that require YCBCR conversion or external formats must be created with a VkSamplerYcbcrConversionInfo structure in the `pNext` chain to be used with sampling. Any image view created with a VkSamplerYcbcrConversionInfo structure in the `pNext` chain must only be sampled using a sampler with an identically defined VkSamplerYcbcrConversion. When used in a video coding operation, the specified sampler Y′CBCR conversion has no effect.

Table 1. Image Type and Image View Type Compatibility Requirements
Image View Type | Compatible Image Types
--- | ---
VK_IMAGE_VIEW_TYPE_1D | VK_IMAGE_TYPE_1D
VK_IMAGE_VIEW_TYPE_1D_ARRAY | VK_IMAGE_TYPE_1D
VK_IMAGE_VIEW_TYPE_2D | VK_IMAGE_TYPE_2D , VK_IMAGE_TYPE_3D
VK_IMAGE_VIEW_TYPE_2D_ARRAY | VK_IMAGE_TYPE_2D , VK_IMAGE_TYPE_3D
VK_IMAGE_VIEW_TYPE_CUBE | VK_IMAGE_TYPE_2D
VK_IMAGE_VIEW_TYPE_CUBE_ARRAY | VK_IMAGE_TYPE_2D
VK_IMAGE_VIEW_TYPE_3D | VK_IMAGE_TYPE_3D

Valid Usage

- VUID-VkImageViewCreateInfo-image-01003
  If `image` was not created with VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then `viewType` must not be VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-VkImageViewCreateInfo-viewType-01004
  If the `imageCubeArray` feature is not enabled, `viewType` must not be VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

- VUID-VkImageViewCreateInfo-image-06723
  If `image` was created with VK_IMAGE_TYPE_3D but without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set then `viewType` must not be VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-06728
  If `image` was created with VK_IMAGE_TYPE_3D but without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, then `viewType` must not be VK_IMAGE_VIEW_TYPE_2D

- VUID-VkImageViewCreateInfo-image-04970
  If `image` was created with VK_IMAGE_TYPE_3D and `viewType` is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY then `subresourceRange.levelCount` must be 1

- VUID-VkImageViewCreateInfo-image-04972
  If `image` was created with a `samples` value not equal to VK_SAMPLE_COUNT_1_BIT then `viewType` must be either VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-04441
  `image` must have been created with a `usage` value containing at least one of the following:

  - VK_IMAGE_USAGE_SAMPLED_BIT

  - VK_IMAGE_USAGE_STORAGE_BIT

  - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT

  - VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

  - VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT

  - VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR

  - VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM

  - VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM

  - VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

  - VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkImageViewCreateInfo-None-02273
  The format features of the resultant image view must contain at least one bit

- VUID-VkImageViewCreateInfo-usage-02274
  If `usage` contains VK_IMAGE_USAGE_SAMPLED_BIT, then the format features of the resultant image view must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT

- VUID-VkImageViewCreateInfo-usage-02275
  If `usage` contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT

- VUID-VkImageViewCreateInfo-usage-08931
  If `usage` contains VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, then the image view’s format features must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkImageViewCreateInfo-usage-02277
  If `usage` contains VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, then the image view’s format features must contain VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

- VUID-VkImageViewCreateInfo-image-08333
  If `usage` contains VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08334
  If `usage` contains VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08335
  `usage` must not include VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08336
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08337
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR

- VUID-VkImageViewCreateInfo-image-08338
  `usage` must not include VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-10259
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-10260
  If `usage` contains VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-08932
  If `usage` contains VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, and any of the following is true:

  - the `externalFormatResolve` feature is not enabled

  - the `nullColorAttachmentWithExternalFormatResolve` property is VK_FALSE

  - `image` was created with an VkExternalFormatANDROID::`externalFormat` value of 0

    then the image view’s format features must contain at least one of VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

- VUID-VkImageViewCreateInfo-subresourceRange-01478
  `subresourceRange.baseMipLevel` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-subresourceRange-01718
  If `subresourceRange.levelCount` is not VK_REMAINING_MIP_LEVELS, `subresourceRange.baseMipLevel` + `subresourceRange.levelCount` must be less than or equal to the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-image-02571
  If `image` was created with the VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage flag set, `subresourceRange.levelCount` must be `1`

- VUID-VkImageViewCreateInfo-image-06724
  If `image` is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, or `viewType` is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.baseArrayLayer` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-subresourceRange-06725
  If `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `image` is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, or `viewType` is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.layerCount` must be non-zero and `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-VkImageViewCreateInfo-image-02724
  If `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, and `viewType` is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.baseArrayLayer` must be less than the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageViewCreateInfo-subresourceRange-02725
  If `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `image` is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, and `viewType` is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, `subresourceRange.layerCount` must be non-zero and `subresourceRange.baseArrayLayer` + `subresourceRange.layerCount` must be less than or equal to the depth computed from `baseMipLevel` and `extent.depth` specified in VkImageCreateInfo when `image` was created, according to the formula defined in Image Mip Level Sizing

- VUID-VkImageViewCreateInfo-image-01761
  If `image` was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, and if the `format` of the `image` is not a multi-planar format, `format` must be compatible with the `format` used to create `image`, as defined in Format Compatibility Classes

- VUID-VkImageViewCreateInfo-image-01583
  If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, `format` must be compatible with, or must be an uncompressed format that is size-compatible with, the `format` used to create `image`

- VUID-VkImageViewCreateInfo-image-07072
  If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and `format` is a non-compressed format, the `levelCount` member of `subresourceRange` must be `1`

- VUID-VkImageViewCreateInfo-image-09487
  If `image` was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, the `VkPhysicalDeviceMaintenance6Properties`::`blockTexelViewCompatibleMultipleLayers` property is not VK_TRUE, and `format` is a non-compressed format, then the `layerCount` member of `subresourceRange` must be `1`

- VUID-VkImageViewCreateInfo-pNext-01585
  If a VkImageFormatListCreateInfo structure was included in the `pNext` chain of the VkImageCreateInfo structure used when creating `image` and VkImageFormatListCreateInfo::`viewFormatCount` is not zero then `format` must be one of the formats in VkImageFormatListCreateInfo::`pViewFormats`

- VUID-VkImageViewCreateInfo-image-01586
  If `image` was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the `format` of the `image` is a multi-planar format, and if `subresourceRange.aspectMask` is one of the multi-planar aspect mask bits, then `format` must be compatible with the VkFormat for the plane of the `image` `format` indicated by `subresourceRange.aspectMask`, as defined in https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-compatible-planes

- VUID-VkImageViewCreateInfo-subresourceRange-07818
  `subresourceRange.aspectMask` must only have at most 1 valid multi-planar aspect mask bit

- VUID-VkImageViewCreateInfo-image-12397
  If `image` was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag `format` must be identical to the `format` used to create `image`

- VUID-VkImageViewCreateInfo-format-12398
  If the `format` of the `image` is a multi-planar format and `subresourceRange.aspectMask` is VK_IMAGE_ASPECT_COLOR_BIT, `format` must be identical to the `format` used to create `image`

- VUID-VkImageViewCreateInfo-format-06415
  If the image view’s format requires a sampler Y′CBCR conversion and `usage` contains VK_IMAGE_USAGE_SAMPLED_BIT, then the `pNext` chain must include a VkSamplerYcbcrConversionInfo structure with a conversion value other than VK_NULL_HANDLE

- VUID-VkImageViewCreateInfo-format-04714
  If `format` has a `_422` or `_420` suffix then `image` must have been created with a width that is a multiple of 2

- VUID-VkImageViewCreateInfo-format-04715
  If `format` has a `_420` suffix then `image` must have been created with a height that is a multiple of 2

- VUID-VkImageViewCreateInfo-pNext-01970
  If the `pNext` chain includes a VkSamplerYcbcrConversionInfo structure with a `conversion` value other than VK_NULL_HANDLE, all members of `components` must have the identity swizzle

- VUID-VkImageViewCreateInfo-pNext-06658
  If the `pNext` chain includes a VkSamplerYcbcrConversionInfo structure with a `conversion` value other than VK_NULL_HANDLE, `format` must be the same used in VkSamplerYcbcrConversionCreateInfo::`format`

- VUID-VkImageViewCreateInfo-image-01020
  If `image` is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-VkImageViewCreateInfo-subResourceRange-01021
  `viewType` must be compatible with the type of `image` as shown in the view type compatibility table

- VUID-VkImageViewCreateInfo-image-02399
  If `image` has an Android external format, `format` must be VK_FORMAT_UNDEFINED

- VUID-VkImageViewCreateInfo-image-02400
  If `image` has an Android external format, the `pNext` chain must include a VkSamplerYcbcrConversionInfo structure with a `conversion` object created with the same external format as `image`

- VUID-VkImageViewCreateInfo-image-02401
  If `image` has an Android external format, all members of `components` must be the identity swizzle

- VUID-VkImageViewCreateInfo-image-08957
  If `image` has an QNX Screen external format, `format` must be VK_FORMAT_UNDEFINED

- VUID-VkImageViewCreateInfo-image-08958
  If `image` has an QNX Screen external format, the `pNext` chain must include a VkSamplerYcbcrConversionInfo structure with a `conversion` object created with the same external format as `image`

- VUID-VkImageViewCreateInfo-image-08959
  If `image` has an QNX Screen external format, all members of `components` must be the identity swizzle

- VUID-VkImageViewCreateInfo-image-02086
  If `image` was created with the VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage flag set, `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-02087
  If the `shadingRateImage` feature is enabled, and `image` was created with the VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV usage flag set, `format` must be VK_FORMAT_R8_UINT

- VUID-VkImageViewCreateInfo-attachmentFragmentShadingRate-12386
  If the `attachmentFragmentShadingRate` feature is not enabled, the `usage` for the image view must not contain VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-04550
  If the `usage` for the image view includes VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, then the image view’s format features must contain VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-VkImageViewCreateInfo-usage-04551
  If the `usage` for the image view includes VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, and `layeredShadingRateAttachments` is VK_FALSE, `subresourceRange.layerCount` must be `1`

- VUID-VkImageViewCreateInfo-flags-02572
  If the `fragmentDensityMapDynamic` feature is not enabled, `flags` must not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT

- VUID-VkImageViewCreateInfo-flags-03567
  If the `fragmentDensityMapDeferred` feature is not enabled, `flags` must not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT

- VUID-VkImageViewCreateInfo-flags-03568
  If `flags` contains VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT, `flags` must not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT

- VUID-VkImageViewCreateInfo-image-03569
  If `image` was created with `flags` containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT and the VK_IMAGE_USAGE_SAMPLED_BIT usage flag set, `subresourceRange.layerCount` must be less than or equal to `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`::`maxSubsampledArrayLayers`

- VUID-VkImageViewCreateInfo-invocationMask-04993
  If the `invocationMask` feature is enabled, and `image` was created with the VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI usage flag set, `format` must be VK_FORMAT_R8_UINT

- VUID-VkImageViewCreateInfo-flags-04116
  If `flags` does not contain VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT, and `image` was created with the VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage flag set, its `flags` must not contain any of VK_IMAGE_CREATE_PROTECTED_BIT, VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT

- VUID-VkImageViewCreateInfo-pNext-02662
  If the `pNext` chain includes a VkImageViewUsageCreateInfo structure, and `image` was not created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, its `usage` member must not include any bits that were not set in the `usage` member of the VkImageCreateInfo structure used to create `image`

- VUID-VkImageViewCreateInfo-pNext-02663
  If the `pNext` chain includes a VkImageViewUsageCreateInfo structure, `image` was created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, and `subresourceRange.aspectMask` includes VK_IMAGE_ASPECT_STENCIL_BIT, the `usage` member of the VkImageViewUsageCreateInfo structure must not include any bits that were not set in the `usage` member of the VkImageStencilUsageCreateInfo structure used to create `image`

- VUID-VkImageViewCreateInfo-pNext-02664
  If the `pNext` chain includes a VkImageViewUsageCreateInfo structure, `image` was created with a VkImageStencilUsageCreateInfo structure included in the `pNext` chain of VkImageCreateInfo, and `subresourceRange.aspectMask` includes bits other than VK_IMAGE_ASPECT_STENCIL_BIT, the `usage` member of the VkImageViewUsageCreateInfo structure must not include any bits that were not set in the `usage` member of the VkImageCreateInfo structure used to create `image`

- VUID-VkImageViewCreateInfo-imageViewType-04973
  If `viewType` is VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_2D, or VK_IMAGE_VIEW_TYPE_3D; and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, then `subresourceRange.layerCount` must be 1

- VUID-VkImageViewCreateInfo-imageViewType-04974
  If `viewType` is VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_2D, or VK_IMAGE_VIEW_TYPE_3D; and `subresourceRange.layerCount` is VK_REMAINING_ARRAY_LAYERS, then the remaining number of layers must be 1

- VUID-VkImageViewCreateInfo-viewType-02960
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.layerCount` must be `6`

- VUID-VkImageViewCreateInfo-viewType-02961
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE_ARRAY and `subresourceRange.layerCount` is not VK_REMAINING_ARRAY_LAYERS, `subresourceRange.layerCount` must be a multiple of `6`

- VUID-VkImageViewCreateInfo-viewType-02962
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE and `subresourceRange.layerCount` is VK_REMAINING_ARRAY_LAYERS, the remaining number of layers must be `6`

- VUID-VkImageViewCreateInfo-viewType-02963
  If `viewType` is VK_IMAGE_VIEW_TYPE_CUBE_ARRAY and `subresourceRange.layerCount` is VK_REMAINING_ARRAY_LAYERS, the remaining number of layers must be a multiple of `6`

- VUID-VkImageViewCreateInfo-imageViewFormatSwizzle-04465
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`imageViewFormatSwizzle` is VK_FALSE, all elements of `components` must have the identity swizzle

- VUID-VkImageViewCreateInfo-imageViewFormatReinterpretation-04466
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`imageViewFormatReinterpretation` is VK_FALSE, the VkFormat in `format` must not contain a different number of components, or a different number of bits in each component, than the format of the `VkImage` in `image`

- VUID-VkImageViewCreateInfo-image-04817
  If `image` was created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set, VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-04818
  If `image` was created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR usage flag set, VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-image-10261
  If `image` was created with the VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR usage flags set, then `viewType` must be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-flags-08106
  If `flags` includes VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the `descriptorBufferCaptureReplay` feature must be enabled

- VUID-VkImageViewCreateInfo-pNext-08107
  If the `pNext` chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, `flags` must contain VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT

- VUID-VkImageViewCreateInfo-pNext-06787
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT

- VUID-VkImageViewCreateInfo-pNext-06944
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `textureSampleWeighted` feature must be enabled

- VUID-VkImageViewCreateInfo-pNext-06945
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `image` must have been created with the VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM usage flag set

- VUID-VkImageViewCreateInfo-pNext-06946
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `components` must be VK_COMPONENT_SWIZZLE_IDENTITY for all components

- VUID-VkImageViewCreateInfo-pNext-06947
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `subresourceRange.aspectMask` must be VK_IMAGE_ASPECT_COLOR_BIT

- VUID-VkImageViewCreateInfo-pNext-06948
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `subresourceRange.levelCount` must be `1`

- VUID-VkImageViewCreateInfo-pNext-06949
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure, then `viewType` must be VK_IMAGE_VIEW_TYPE_1D_ARRAY or VK_IMAGE_VIEW_TYPE_2D_ARRAY

- VUID-VkImageViewCreateInfo-pNext-06950
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and if `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY, then `image` must have been created with `imageType` VK_IMAGE_TYPE_1D

- VUID-VkImageViewCreateInfo-pNext-06951
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY, then `subresourceRange.layerCount` must be equal to `2`

- VUID-VkImageViewCreateInfo-pNext-06952
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_1D_ARRAY, then `image` must have been created with `width` equal to or greater than (n u m P ha ses×ma x(a l i g n(f i lt er S i ze.w i d t h,4),f i lt er S i ze.h e i g h t))

- VUID-VkImageViewCreateInfo-pNext-06953
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and if `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `image` must have been created with `imageType` VK_IMAGE_TYPE_2D

- VUID-VkImageViewCreateInfo-pNext-06954
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `subresourceRange.layerCount` must be equal or greater than numPhases

- VUID-VkImageViewCreateInfo-pNext-06955
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `image` must have been created with `width` equal to or greater than `filterSize.width`

- VUID-VkImageViewCreateInfo-pNext-06956
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure and `viewType` is VK_IMAGE_VIEW_TYPE_2D_ARRAY, then `image` must have been created with `height` equal to or greater than `filterSize.height`

- VUID-VkImageViewCreateInfo-pNext-06957
  If the `pNext` chain includes VkImageViewSampleWeightCreateInfoQCOM structure then VkImageViewSampleWeightCreateInfoQCOM::`filterSize.height` must be less than or equal to `VkPhysicalDeviceImageProcessingPropertiesQCOM`::`maxWeightFilterDimension.height`

- VUID-VkImageViewCreateInfo-subresourceRange-09594
  `subresourceRange.aspectMask` must be valid for the `format` the `image` was created with

- VUID-VkImageViewCreateInfo-image-13357
  If `image` was created with VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR, `format` must not be a multi-planar format

- VUID-VkImageViewCreateInfo-None-12280
  If Vulkan 1.3 is not supported and the `ycbcr2plane444Formats` feature is not enabled, `format` must not be VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, or VK_FORMAT_G16_B16R16_2PLANE_444_UNORM

Valid Usage (Implicit)

- VUID-VkImageViewCreateInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO

- VUID-VkImageViewCreateInfo-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 VkExportMetalObjectCreateInfoEXT, VkImageViewASTCDecodeModeEXT, VkImageViewMinLodCreateInfoEXT, VkImageViewSampleWeightCreateInfoQCOM, VkImageViewSlicedCreateInfoEXT, VkImageViewUsageCreateInfo, VkOpaqueCaptureDescriptorDataCreateInfoEXT, or VkSamplerYcbcrConversionInfo

- VUID-VkImageViewCreateInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXT

- VUID-VkImageViewCreateInfo-flags-parameter
  `flags` must be a valid combination of VkImageViewCreateFlagBits values

- VUID-VkImageViewCreateInfo-image-parameter
  `image` must be a valid VkImage handle

- VUID-VkImageViewCreateInfo-viewType-parameter
  `viewType` must be a valid VkImageViewType value

- VUID-VkImageViewCreateInfo-format-parameter
  `format` must be a valid VkFormat value

- VUID-VkImageViewCreateInfo-components-parameter
  `components` must be a valid VkComponentMapping structure

- VUID-VkImageViewCreateInfo-subresourceRange-parameter
  `subresourceRange` must be a valid VkImageSubresourceRange structure

## See Also

VK_VERSION_1_0, VkComponentMapping, VkFormat, VkImage, VkImageDescriptorInfoEXT, VkImageSubresourceRange, VkImageViewCreateFlags, VkImageViewType, VkStructureType, vkCreateImageView

## 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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0