C Specification
The VkImageCreateInfo structure is defined as:
// Provided by VK_VERSION_1_0
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
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
flagsis a bitmask of VkImageCreateFlagBits describing additional parameters of the image. -
imageTypeis 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. -
formatis a VkFormat describing the format and type of the texel blocks that will be contained in the image. -
extentis a VkExtent3D describing the number of data elements in each dimension of the base level. -
mipLevelsdescribes the number of levels of detail available for minified sampling of the image. -
arrayLayersis the number of layers in the image. -
samplesis a VkSampleCountFlagBits specifying the number of samples per texel. -
tilingis a VkImageTiling value specifying the tiling arrangement of the texel blocks in memory. -
usageis a bitmask of VkImageUsageFlagBits describing the intended usage of the image. -
sharingModeis a VkSharingMode value specifying the sharing mode of the image when it will be accessed by multiple queue families. -
queueFamilyIndexCountis the number of entries in thepQueueFamilyIndicesarray. -
pQueueFamilyIndicesis a list of queue families that will access this image (ignored ifsharingModeis notVK_SHARING_MODE_CONCURRENT). -
initialLayoutis 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:
-
imageTypeisVK_IMAGE_TYPE_2D -
formatis not a depth/stencil format -
mipLevelsis 1 -
arrayLayersis 1 -
samplesisVK_SAMPLE_COUNT_1_BIT -
usageonly includesVK_IMAGE_USAGE_TRANSFER_SRC_BITand/orVK_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:
-
imageTypeisVK_IMAGE_TYPE_2D -
mipLevelsis 1 -
arrayLayersis 1 -
samplesisVK_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 For images created with |
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
tilingis notVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenimageCreateDrmFormatModifiersis empty. -
If VkImageCreateInfo::
pNextcontains VkImageDrmFormatModifierExplicitCreateInfoEXT, thenimageCreateDrmFormatModifierscontains exactly one modifier, VkImageDrmFormatModifierExplicitCreateInfoEXT::drmFormatModifier. -
If VkImageCreateInfo::
pNextcontains VkImageDrmFormatModifierListCreateInfoEXT, thenimageCreateDrmFormatModifierscontains the entire array VkImageDrmFormatModifierListCreateInfoEXT::pDrmFormatModifiers.
-
-
Let
VkBool32 imageCreateMaybeLinearindicate if the resultant image may be linear.-
If
tilingisVK_IMAGE_TILING_LINEAR, thenimageCreateMaybeLinearistrue. -
If
tilingisVK_IMAGE_TILING_OPTIMAL, thenimageCreateMaybeLinearisfalse. -
If
tilingisVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenimageCreateMaybeLinear_istrueif and only ifimageCreateDrmFormatModifierscontainsDRM_FORMAT_MOD_LINEAR.
-
-
Let
VkFormatFeatureFlags imageCreateFormatFeaturesbe the set of valid format features available during image creation.-
If
tilingisVK_IMAGE_TILING_LINEAR, thenimageCreateFormatFeaturesis the value of VkFormatProperties::linearTilingFeaturesfound by calling vkGetPhysicalDeviceFormatProperties with parameterformatequal to VkImageCreateInfo::format. -
If
tilingisVK_IMAGE_TILING_OPTIMAL, and if thepNextchain includes no VkExternalFormatANDROID structure with non-zeroexternalFormat, thenimageCreateFormatFeaturesis value of VkFormatProperties::optimalTilingFeaturesfound by calling vkGetPhysicalDeviceFormatProperties with parameterformatequal to VkImageCreateInfo::format. -
If
tilingisVK_IMAGE_TILING_OPTIMAL, and if thepNextchain includes a VkExternalFormatANDROID structure with non-zeroexternalFormat, thenimageCreateFormatFeaturesis the value of VkAndroidHardwareBufferFormatPropertiesANDROID::formatFeaturesobtained by vkGetAndroidHardwareBufferPropertiesANDROID with a matchingexternalFormatvalue. -
If
tilingisVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the value ofimageCreateFormatFeaturesis found by calling vkGetPhysicalDeviceFormatProperties2 with VkImageFormatProperties::formatequal to VkImageCreateInfo::formatand with VkDrmFormatModifierPropertiesListEXT chained into VkImageFormatProperties2; by collecting all members of the returned array VkDrmFormatModifierPropertiesListEXT::pDrmFormatModifierPropertieswhosedrmFormatModifierbelongs toimageCreateDrmFormatModifiers; and by taking the bitwise intersection, over the collected array members, ofdrmFormatModifierTilingFeatures. (The resultantimageCreateFormatFeaturesmay be empty).
-
-
Let
VkImageFormatProperties2 imageCreateImageFormatPropertiesList[]be defined as follows.-
If VkImageCreateInfo::
pNextcontains no VkExternalFormatANDROID structure with non-zeroexternalFormat, thenimageCreateImageFormatPropertiesListis the list of structures obtained by calling vkGetPhysicalDeviceImageFormatProperties2, possibly multiple times, as follows:-
The parameters VkPhysicalDeviceImageFormatInfo2::
format,imageType,tiling,usage, andflagsmust be equal to those in VkImageCreateInfo. -
If VkImageCreateInfo::
pNextcontains a VkExternalMemoryImageCreateInfo structure whosehandleTypesis not0, then VkPhysicalDeviceImageFormatInfo2::pNextmust contain a VkPhysicalDeviceExternalImageFormatInfo structure whosehandleTypeis not0; and vkGetPhysicalDeviceImageFormatProperties2 must be called for each handle type in VkExternalMemoryImageCreateInfo::handleTypes, successively setting VkPhysicalDeviceExternalImageFormatInfo::handleTypeon each call. -
If VkImageCreateInfo::
pNextcontains no VkExternalMemoryImageCreateInfo structure, or contains a structure whosehandleTypesis0, then VkPhysicalDeviceImageFormatInfo2::pNextmust either contain no VkPhysicalDeviceExternalImageFormatInfo structure, or contain a structure whosehandleTypeis0. -
If
tilingisVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then VkPhysicalDeviceImageFormatInfo2::pNextmust contain a VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure wheresharingModeis equal to VkImageCreateInfo::sharingMode; and, ifsharingModeisVK_SHARING_MODE_CONCURRENT, thenqueueFamilyIndexCountandpQueueFamilyIndicesmust be equal to those in VkImageCreateInfo; and, ifflagscontainsVK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the VkImageFormatListCreateInfo structure included in thepNextchain of VkPhysicalDeviceImageFormatInfo2 must be equivalent to the one included in thepNextchain of VkImageCreateInfo; and vkGetPhysicalDeviceImageFormatProperties2 must be called for each modifier inimageCreateDrmFormatModifiers, successively setting VkPhysicalDeviceImageDrmFormatModifierInfoEXT::drmFormatModifieron each call. -
If
tilingis notVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then VkPhysicalDeviceImageFormatInfo2::pNextmust contain no VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure. -
If any call to vkGetPhysicalDeviceImageFormatProperties2 returns an error, then
imageCreateImageFormatPropertiesListis defined to be the empty list.
-
-
If VkImageCreateInfo::
pNextcontains a VkExternalFormatANDROID structure with non-zeroexternalFormat, thenimageCreateImageFormatPropertiesListcontains a single element where:-
VkImageFormatProperties::maxMipLevelsis ⌊log2(max(extent.width,extent.height,extent.depth))⌋ + 1. -
VkImageFormatProperties::maxArrayLayersis VkPhysicalDeviceLimits::maxImageArrayLayers. -
Each component of
VkImageFormatProperties::maxExtentis VkPhysicalDeviceLimits::maxImageDimension2D. -
VkImageFormatProperties::sampleCountscontains exactlyVK_SAMPLE_COUNT_1_BIT.
-
-
-
Let
uint32_t imageCreateMaxMipLevelsbe the minimum value of VkImageFormatProperties::maxMipLevelsinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. -
Let
uint32_t imageCreateMaxArrayLayersbe the minimum value of VkImageFormatProperties::maxArrayLayersinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. -
Let
VkExtent3D imageCreateMaxExtentbe the component-wise minimum over all VkImageFormatProperties::maxExtentvalues inimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. -
Let
VkSampleCountFlags imageCreateSampleCountsbe the intersection of each VkImageFormatProperties::sampleCountsinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty.
-
VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251
Each of the following values (as described in Image Creation Limits) must not be undefinedimageCreateMaxMipLevels,imageCreateMaxArrayLayers,imageCreateMaxExtent, andimageCreateSampleCounts -
VUID-VkImageCreateInfo-sharingMode-00941
IfsharingModeisVK_SHARING_MODE_CONCURRENT,pQueueFamilyIndicesmust be a valid pointer to an array ofqueueFamilyIndexCountuint32_tvalues -
VUID-VkImageCreateInfo-sharingMode-00942
IfsharingModeisVK_SHARING_MODE_CONCURRENT,queueFamilyIndexCountmust be greater than1 -
VUID-VkImageCreateInfo-sharingMode-01420
IfsharingModeisVK_SHARING_MODE_CONCURRENT, each element ofpQueueFamilyIndicesmust be unique and must be less thanpQueueFamilyPropertyCountreturned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2 for thephysicalDevicethat was used to createdevice -
VUID-VkImageCreateInfo-pNext-01974
If thepNextchain includes a VkExternalFormatANDROID structure, and itsexternalFormatmember is non-zero theformatmust beVK_FORMAT_UNDEFINED -
VUID-VkImageCreateInfo-pNext-01975
If thepNextchain does not include a VkExternalFormatANDROID structure, or does and itsexternalFormatmember is0, theformatmust not beVK_FORMAT_UNDEFINED -
VUID-VkImageCreateInfo-extent-00944
extent.widthmust be greater than0 -
VUID-VkImageCreateInfo-extent-00945
extent.heightmust be greater than0 -
VUID-VkImageCreateInfo-extent-00946
extent.depthmust be greater than0 -
VUID-VkImageCreateInfo-mipLevels-00947
mipLevelsmust be greater than0 -
VUID-VkImageCreateInfo-arrayLayers-00948
arrayLayersmust be greater than0 -
VUID-VkImageCreateInfo-flags-00949
IfflagscontainsVK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT,imageTypemust beVK_IMAGE_TYPE_2D -
VUID-VkImageCreateInfo-flags-02557
IfflagscontainsVK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,imageTypemust beVK_IMAGE_TYPE_2D -
VUID-VkImageCreateInfo-flags-00950
IfflagscontainsVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,imageTypemust beVK_IMAGE_TYPE_3D -
VUID-VkImageCreateInfo-extent-02252
extent.widthmust be less than or equal toimageCreateMaxExtent.width(as defined in Image Creation Limits) -
VUID-VkImageCreateInfo-extent-02253
extent.heightmust be less than or equal toimageCreateMaxExtent.height(as defined in Image Creation Limits) -
VUID-VkImageCreateInfo-extent-02254
extent.depthmust be less than or equal toimageCreateMaxExtent.depth(as defined in Image Creation Limits) -
VUID-VkImageCreateInfo-imageType-00954
IfimageTypeisVK_IMAGE_TYPE_2DandflagscontainsVK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT,extent.widthandextent.heightmust be equal andarrayLayersmust be greater than or equal to 6 -
VUID-VkImageCreateInfo-imageType-00956
IfimageTypeisVK_IMAGE_TYPE_1D, bothextent.heightandextent.depthmust be1 -
VUID-VkImageCreateInfo-imageType-00957
IfimageTypeisVK_IMAGE_TYPE_2D,extent.depthmust be1 -
VUID-VkImageCreateInfo-mipLevels-00958
mipLevelsmust be less than or equal to the number of levels in the complete mipmap chain based onextent.width,extent.height, andextent.depth -
VUID-VkImageCreateInfo-mipLevels-02255
mipLevelsmust be less than or equal toimageCreateMaxMipLevels(as defined in Image Creation Limits) -
VUID-VkImageCreateInfo-arrayLayers-02256
arrayLayersmust be less than or equal toimageCreateMaxArrayLayers(as defined in Image Creation Limits) -
VUID-VkImageCreateInfo-imageType-00961
IfimageTypeisVK_IMAGE_TYPE_3D,arrayLayersmust be1 -
VUID-VkImageCreateInfo-samples-02257
Ifsamplesis notVK_SAMPLE_COUNT_1_BIT, thenimageTypemust beVK_IMAGE_TYPE_2D,flagsmust not containVK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT,mipLevelsmust be equal to1, andimageCreateMaybeLinear(as defined in Image Creation Limits) must befalse, -
VUID-VkImageCreateInfo-samples-02558
Ifsamplesis notVK_SAMPLE_COUNT_1_BIT,usagemust not containVK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT -
VUID-VkImageCreateInfo-usage-00963
IfusageincludesVK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other thanVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, andVK_IMAGE_USAGE_INPUT_ATTACHMENT_BITmust not be set -
VUID-VkImageCreateInfo-usage-00964
IfusageincludesVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, orVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.widthmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferWidth -
VUID-VkImageCreateInfo-usage-00965
IfusageincludesVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, orVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.heightmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferHeight -
VUID-VkImageCreateInfo-usage-02559
IfusageincludesVK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,extent.widthmust be less than or equal to ⌈minFragmentDensityTexelSizewidthmaxFramebufferWidth⌉ -
VUID-VkImageCreateInfo-usage-02560
IfusageincludesVK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,extent.heightmust be less than or equal to ⌈minFragmentDensityTexelSizeheightmaxFramebufferHeight⌉ -
VUID-VkImageCreateInfo-usage-00966
IfusageincludesVK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT,usagemust also contain at least one ofVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, orVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT -
VUID-VkImageCreateInfo-samples-02258
samplesmust be a bit value that is set inimageCreateSampleCounts(as defined in Image Creation Limits) -
VUID-VkImageCreateInfo-usage-00968
If the multisampled storage images feature is not enabled, andusagecontainsVK_IMAGE_USAGE_STORAGE_BIT,samplesmust beVK_SAMPLE_COUNT_1_BIT -
VUID-VkImageCreateInfo-flags-00969
If the sparse bindings feature is not enabled,flagsmust not containVK_IMAGE_CREATE_SPARSE_BINDING_BIT -
VUID-VkImageCreateInfo-flags-01924
If the sparse aliased residency feature is not enabled,flagsmust not containVK_IMAGE_CREATE_SPARSE_ALIASED_BIT -
VUID-VkImageCreateInfo-tiling-04121
IftilingisVK_IMAGE_TILING_LINEAR,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00970
IfimageTypeisVK_IMAGE_TYPE_1D,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00971
If the sparse residency for 2D images feature is not enabled, andimageTypeisVK_IMAGE_TYPE_2D,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00972
If the sparse residency for 3D images feature is not enabled, andimageTypeisVK_IMAGE_TYPE_3D,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00973
If the sparse residency for images with 2 samples feature is not enabled,imageTypeisVK_IMAGE_TYPE_2D, andsamplesisVK_SAMPLE_COUNT_2_BIT,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00974
If the sparse residency for images with 4 samples feature is not enabled,imageTypeisVK_IMAGE_TYPE_2D, andsamplesisVK_SAMPLE_COUNT_4_BIT,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00975
If the sparse residency for images with 8 samples feature is not enabled,imageTypeisVK_IMAGE_TYPE_2D, andsamplesisVK_SAMPLE_COUNT_8_BIT,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-imageType-00976
If the sparse residency for images with 16 samples feature is not enabled,imageTypeisVK_IMAGE_TYPE_2D, andsamplesisVK_SAMPLE_COUNT_16_BIT,flagsmust not containVK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT -
VUID-VkImageCreateInfo-flags-00987
IfflagscontainsVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITorVK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also containVK_IMAGE_CREATE_SPARSE_BINDING_BIT -
VUID-VkImageCreateInfo-None-01925
If any of the bitsVK_IMAGE_CREATE_SPARSE_BINDING_BIT,VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, orVK_IMAGE_CREATE_SPARSE_ALIASED_BITare set,VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BITmust not also be set -
VUID-VkImageCreateInfo-flags-01890
If the protected memory feature is not enabled,flagsmust not containVK_IMAGE_CREATE_PROTECTED_BIT -
VUID-VkImageCreateInfo-None-01891
If any of the bitsVK_IMAGE_CREATE_SPARSE_BINDING_BIT,VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, orVK_IMAGE_CREATE_SPARSE_ALIASED_BITare set,VK_IMAGE_CREATE_PROTECTED_BITmust not also be set -
VUID-VkImageCreateInfo-pNext-00988
If thepNextchain includes a VkExternalMemoryImageCreateInfoNV structure, it must not contain a VkExternalMemoryImageCreateInfo structure -
VUID-VkImageCreateInfo-pNext-00990
If thepNextchain includes a VkExternalMemoryImageCreateInfo structure, itshandleTypesmember must only contain bits that are also in VkExternalImageFormatProperties::externalMemoryProperties.compatibleHandleTypes, as returned by vkGetPhysicalDeviceImageFormatProperties2 withformat,imageType,tiling,usage, andflagsequal to those in this structure, and with a VkPhysicalDeviceExternalImageFormatInfo structure included in thepNextchain, with ahandleTypeequal to any one of the handle types specified in VkExternalMemoryImageCreateInfo::handleTypes -
VUID-VkImageCreateInfo-pNext-00991
If thepNextchain includes a VkExternalMemoryImageCreateInfoNV structure, itshandleTypesmember must only contain bits that are also in VkExternalImageFormatPropertiesNV::externalMemoryProperties.compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalImageFormatPropertiesNV withformat,imageType,tiling,usage, andflagsequal to those in this structure, and withexternalHandleTypeequal to any one of the handle types specified in VkExternalMemoryImageCreateInfoNV::handleTypes -
VUID-VkImageCreateInfo-physicalDeviceCount-01421
If the logical device was created with VkDeviceGroupDeviceCreateInfo::physicalDeviceCountequal to 1,flagsmust not containVK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT -
VUID-VkImageCreateInfo-flags-02259
IfflagscontainsVK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, thenmipLevelsmust be one,arrayLayersmust be one,imageTypemust beVK_IMAGE_TYPE_2D. andimageCreateMaybeLinear(as defined in Image Creation Limits) must befalse -
VUID-VkImageCreateInfo-flags-01572
IfflagscontainsVK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, thenformatmust be a block-compressed image format, an ETC compressed image format, or an ASTC compressed image format -
VUID-VkImageCreateInfo-flags-01573
IfflagscontainsVK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, thenflagsmust also containVK_IMAGE_CREATE_MUTABLE_FORMAT_BIT -
VUID-VkImageCreateInfo-initialLayout-00993
initialLayoutmust beVK_IMAGE_LAYOUT_UNDEFINEDorVK_IMAGE_LAYOUT_PREINITIALIZED -
VUID-VkImageCreateInfo-pNext-01443
If thepNextchain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whosehandleTypesmember is not0,initialLayoutmust beVK_IMAGE_LAYOUT_UNDEFINED -
VUID-VkImageCreateInfo-format-02561
If the imageformatis one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, thenmipLevelsmust be 1 -
VUID-VkImageCreateInfo-format-02562
If the imageformatis one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion,samplesmust beVK_SAMPLE_COUNT_1_BIT -
VUID-VkImageCreateInfo-format-02563
If the imageformatis one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion,imageTypemust beVK_IMAGE_TYPE_2D -
VUID-VkImageCreateInfo-format-02653
If the imageformatis one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, and theycbcrImageArraysfeature is not enabled,arrayLayersmust be 1 -
VUID-VkImageCreateInfo-imageCreateFormatFeatures-02260
Ifformatis a multi-planar format, and ifimageCreateFormatFeatures(as defined in Image Creation Limits) does not containVK_FORMAT_FEATURE_DISJOINT_BIT, thenflagsmust not containVK_IMAGE_CREATE_DISJOINT_BIT -
VUID-VkImageCreateInfo-format-01577
Ifformatis not a multi-planar format, andflagsdoes not includeVK_IMAGE_CREATE_ALIAS_BIT,flagsmust not containVK_IMAGE_CREATE_DISJOINT_BIT -
VUID-VkImageCreateInfo-format-04712
Ifformathas a_422or_420suffix,widthmust be a multiple of 2 -
VUID-VkImageCreateInfo-format-04713
Ifformathas a_420suffix,heightmust be a multiple of 2 -
VUID-VkImageCreateInfo-tiling-02261
IftilingisVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then thepNextchain must include exactly one of VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT structures -
VUID-VkImageCreateInfo-pNext-02262
If thepNextchain includes a VkImageDrmFormatModifierListCreateInfoEXT or VkImageDrmFormatModifierExplicitCreateInfoEXT structure, thentilingmust beVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT -
VUID-VkImageCreateInfo-tiling-02353
IftilingisVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXTandflagscontainsVK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then thepNextchain must include a VkImageFormatListCreateInfo structure with non-zeroviewFormatCount -
VUID-VkImageCreateInfo-flags-01533
IfflagscontainsVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTformatmust be a depth or depth/stencil format -
VUID-VkImageCreateInfo-pNext-02393
If thepNextchain includes a VkExternalMemoryImageCreateInfo structure whosehandleTypesmember includesVK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,imageTypemust beVK_IMAGE_TYPE_2D -
VUID-VkImageCreateInfo-pNext-02394
If thepNextchain includes a VkExternalMemoryImageCreateInfo structure whosehandleTypesmember includesVK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,mipLevelsmust either be1or equal to the number of levels in the complete mipmap chain based onextent.width,extent.height, andextent.depth -
VUID-VkImageCreateInfo-pNext-02396
If thepNextchain includes a VkExternalFormatANDROID structure whoseexternalFormatmember is not0,flagsmust not includeVK_IMAGE_CREATE_MUTABLE_FORMAT_BIT -
VUID-VkImageCreateInfo-pNext-02397
If thepNextchain includes a VkExternalFormatANDROID structure whoseexternalFormatmember is not0,usagemust not include any usages exceptVK_IMAGE_USAGE_SAMPLED_BIT -
VUID-VkImageCreateInfo-pNext-02398
If thepNextchain includes a VkExternalFormatANDROID structure whoseexternalFormatmember is not0,tilingmust beVK_IMAGE_TILING_OPTIMAL -
VUID-VkImageCreateInfo-format-02795
Ifformatis a depth-stencil format,usageincludesVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and thepNextchain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::stencilUsagemember must also includeVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT -
VUID-VkImageCreateInfo-format-02796
Ifformatis a depth-stencil format,usagedoes not includeVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and thepNextchain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::stencilUsagemember must also not includeVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT -
VUID-VkImageCreateInfo-format-02797
Ifformatis a depth-stencil format,usageincludesVK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and thepNextchain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::stencilUsagemember must also includeVK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT -
VUID-VkImageCreateInfo-format-02798
Ifformatis a depth-stencil format,usagedoes not includeVK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and thepNextchain includes a VkImageStencilUsageCreateInfo structure, then its VkImageStencilUsageCreateInfo::stencilUsagemember must also not includeVK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT -
VUID-VkImageCreateInfo-Format-02536
IfFormatis a depth-stencil format and thepNextchain includes a VkImageStencilUsageCreateInfo structure with itsstencilUsagemember includingVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.widthmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferWidth -
VUID-VkImageCreateInfo-format-02537
Ifformatis a depth-stencil format and thepNextchain includes a VkImageStencilUsageCreateInfo structure with itsstencilUsagemember includingVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.heightmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferHeight -
VUID-VkImageCreateInfo-format-02538
If the multisampled storage images feature is not enabled,formatis a depth-stencil format and thepNextchain includes a VkImageStencilUsageCreateInfo structure with itsstencilUsageincludingVK_IMAGE_USAGE_STORAGE_BIT,samplesmust beVK_SAMPLE_COUNT_1_BIT -
VUID-VkImageCreateInfo-flags-02050
IfflagscontainsVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV,imageTypemust beVK_IMAGE_TYPE_2DorVK_IMAGE_TYPE_3D -
VUID-VkImageCreateInfo-flags-02051
IfflagscontainsVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, it must not containVK_IMAGE_CREATE_CUBE_COMPATIBLE_BITand theformatmust not be a depth/stencil format -
VUID-VkImageCreateInfo-flags-02052
IfflagscontainsVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVandimageTypeisVK_IMAGE_TYPE_2D,extent.widthandextent.heightmust be greater than1 -
VUID-VkImageCreateInfo-flags-02053
IfflagscontainsVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVandimageTypeisVK_IMAGE_TYPE_3D,extent.width,extent.height, andextent.depthmust be greater than1 -
VUID-VkImageCreateInfo-imageType-02082
IfusageincludesVK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,imageTypemust beVK_IMAGE_TYPE_2D -
VUID-VkImageCreateInfo-samples-02083
IfusageincludesVK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,samplesmust beVK_SAMPLE_COUNT_1_BIT -
VUID-VkImageCreateInfo-tiling-02084
IfusageincludesVK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,tilingmust beVK_IMAGE_TILING_OPTIMAL -
VUID-VkImageCreateInfo-flags-02565
IfflagscontainsVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,tilingmust beVK_IMAGE_TILING_OPTIMAL -
VUID-VkImageCreateInfo-flags-02566
IfflagscontainsVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,imageTypemust beVK_IMAGE_TYPE_2D -
VUID-VkImageCreateInfo-flags-02567
IfflagscontainsVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,flagsmust not containVK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT -
VUID-VkImageCreateInfo-flags-02568
IfflagscontainsVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,mipLevelsmust be1 -
VUID-VkImageCreateInfo-imageView2DOn3DImage-04459
If theVK_KHR_portability_subsetextension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::imageView2DOn3DImageisVK_FALSE,flagsmust not containVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT. -
VUID-VkImageCreateInfo-multisampleArrayImage-04460
If theVK_KHR_portability_subsetextension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::multisampleArrayImageisVK_FALSE, andsamplesis notVK_SAMPLE_COUNT_1_BIT, thenarrayLayersmust be1.
-
VUID-VkImageCreateInfo-sType-sType
sTypemust beVK_STRUCTURE_TYPE_IMAGE_CREATE_INFO -
VUID-VkImageCreateInfo-pNext-pNext
EachpNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance of VkDedicatedAllocationImageCreateInfoNV, VkExternalFormatANDROID, VkExternalMemoryImageCreateInfo, VkExternalMemoryImageCreateInfoNV, VkImageDrmFormatModifierExplicitCreateInfoEXT, VkImageDrmFormatModifierListCreateInfoEXT, VkImageFormatListCreateInfo, VkImageStencilUsageCreateInfo, or VkImageSwapchainCreateInfoKHR -
VUID-VkImageCreateInfo-sType-unique
ThesTypevalue of each struct in thepNextchain must be unique -
VUID-VkImageCreateInfo-flags-parameter
flagsmust be a valid combination of VkImageCreateFlagBits values -
VUID-VkImageCreateInfo-imageType-parameter
imageTypemust be a valid VkImageType value -
VUID-VkImageCreateInfo-format-parameter
formatmust be a valid VkFormat value -
VUID-VkImageCreateInfo-samples-parameter
samplesmust be a valid VkSampleCountFlagBits value -
VUID-VkImageCreateInfo-tiling-parameter
tilingmust be a valid VkImageTiling value -
VUID-VkImageCreateInfo-usage-parameter
usagemust be a valid combination of VkImageUsageFlagBits values -
VUID-VkImageCreateInfo-usage-requiredbitmask
usagemust not be0 -
VUID-VkImageCreateInfo-sharingMode-parameter
sharingModemust be a valid VkSharingMode value -
VUID-VkImageCreateInfo-initialLayout-parameter
initialLayoutmust be a valid VkImageLayout value
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.