| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Image
Synopsis
- createImage :: forall (a :: [Type]) io. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Image
- withImage :: forall (a :: [Type]) io r. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> (io Image -> (Image -> io ()) -> r) -> r
- destroyImage :: MonadIO io => Device -> Image -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getImageSubresourceLayout :: MonadIO io => Device -> Image -> ImageSubresource -> io SubresourceLayout
- data ImageCreateInfo (es :: [Type]) = ImageCreateInfo {
- next :: Chain es
- flags :: ImageCreateFlags
- imageType :: ImageType
- format :: Format
- extent :: Extent3D
- mipLevels :: Word32
- arrayLayers :: Word32
- samples :: SampleCountFlagBits
- tiling :: ImageTiling
- usage :: ImageUsageFlags
- sharingMode :: SharingMode
- queueFamilyIndices :: Vector Word32
- initialLayout :: ImageLayout
- data SubresourceLayout = SubresourceLayout {}
- newtype Image = Image Word64
- newtype ImageLayout where
- ImageLayout Int32
- pattern IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT :: ImageLayout
- pattern IMAGE_LAYOUT_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT :: ImageLayout
- pattern IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR :: ImageLayout
- pattern IMAGE_LAYOUT_GENERAL :: ImageLayout
- pattern IMAGE_LAYOUT_PREINITIALIZED :: ImageLayout
- pattern IMAGE_LAYOUT_PRESENT_SRC_KHR :: ImageLayout
- pattern IMAGE_LAYOUT_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_RENDERING_LOCAL_READ :: ImageLayout
- pattern IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_SHARED_PRESENT_KHR :: ImageLayout
- pattern IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_TENSOR_ALIASING_ARM :: ImageLayout
- pattern IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_UNDEFINED :: ImageLayout
- pattern IMAGE_LAYOUT_ZERO_INITIALIZED_EXT :: ImageLayout
Documentation
Arguments
| :: forall (a :: [Type]) io. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> ImageCreateInfo a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io Image |
vkCreateImage - Create a new image object
Valid Usage
-
devicemust support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR,QUEUE_OPTICAL_FLOW_BIT_NV,QUEUE_SPARSE_BINDING_BIT,QUEUE_TRANSFER_BIT,QUEUE_COMPUTE_BIT, orQUEUE_GRAPHICS_BITcapabilities
- If the
flagsmember ofpCreateInfoincludesIMAGE_CREATE_SPARSE_BINDING_BIT, and the extendedSparseAddressSpace feature is not enabled, creating thisImagemust not cause the total required sparse memory for all currently valid sparse resources on the device to exceedPhysicalDeviceLimits::sparseAddressSpaceSize - If the
flagsmember ofpCreateInfoincludesIMAGE_CREATE_SPARSE_BINDING_BIT, the extendedSparseAddressSpace feature is enabled, and theusagemember ofpCreateInfocontains bits not inPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseImageUsageFlags, creating thisImagemust not cause the total required sparse memory for all currently valid sparse resources on the device, excludingBuffercreated withusagemember ofpCreateInfocontaining bits inPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseBufferUsageFlagsandImagecreated withusagemember ofpCreateInfocontaining bits inPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseImageUsageFlags, to exceedPhysicalDeviceLimits::sparseAddressSpaceSize - If the
flagsmember ofpCreateInfoincludesIMAGE_CREATE_SPARSE_BINDING_BITand the extendedSparseAddressSpace feature is enabled, creating thisImagemust not cause the total required sparse memory for all currently valid sparse resources on the device to exceedPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseAddressSpaceSize - If a
BufferCollectionImageCreateInfoFUCHSIAhas been chained topNext,pCreateInfomust match the Sysmem chosen excepting membersImageCreateInfo::extentandImageCreateInfo::usagein the match criteria
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pCreateInfomust be a valid pointer to a validImageCreateInfostructure - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pImagemust be a valid pointer to aImagehandle - The device must have been
created with at least
1queue
Return Codes
See Also
VK_VERSION_1_0,
AllocationCallbacks,
Device, Image,
ImageCreateInfo
withImage :: forall (a :: [Type]) io r. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> (io Image -> (Image -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createImage and destroyImage
To ensure that destroyImage is always called: pass
bracket (or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,) as the last argument.
Arguments
| :: MonadIO io | |
| => Device |
|
| -> Image |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyImage - Destroy an image object
Valid Usage
- All submitted commands that refer
to
image, either directly or via aImageView, must have completed execution
- If
AllocationCallbackswere provided whenimagewas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whenimagewas created,pAllocatormust beNULL -
imagemust not have been acquired fromgetSwapchainImagesKHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
- If
imageis notNULL_HANDLE,imagemust be a validImagehandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure - If
imageis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
imagemust be externally synchronized
See Also
getImageSubresourceLayout Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> Image |
|
| -> ImageSubresource |
|
| -> io SubresourceLayout |
vkGetImageSubresourceLayout - Retrieve information about an image subresource
Description
If the image is linear, then the returned layout is valid for host access.
If the image’s tiling is
IMAGE_TILING_LINEAR and its format is
a
multi-planar format,
then getImageSubresourceLayout describes one format plane of the
image. If the image’s tiling is
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
then getImageSubresourceLayout describes one memory plane of the
image. If the image’s tiling is
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
and the image is
non-linear,
then the returned layout has an implementation-dependent meaning; the
vendor of the image’s
DRM format modifier
may provide documentation that explains how to interpret the returned
layout.
getImageSubresourceLayout is invariant for the lifetime of a single
image. However, the subresource layout of images in Android hardware
buffer or QNX Screen buffer external memory is not known until the image
has been bound to memory, so applications must not call
getImageSubresourceLayout for such an image before it has been bound.
Valid Usage
-
imagemust have been created withtilingequal toIMAGE_TILING_LINEARorIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
- The
aspectMaskmember ofpSubresourcemust only have a single bit set - The
mipLevelmember ofpSubresourcemust be less than themipLevelsspecified inimage - The
arrayLayermember ofpSubresourcemust be less than thearrayLayersspecified inimage - If
formatof theimageis a color format that is not a multi-planar format, andtilingof theimageisIMAGE_TILING_LINEARorIMAGE_TILING_OPTIMAL, theaspectMaskmember ofpSubresourcemust beIMAGE_ASPECT_COLOR_BIT - If
formatof theimagehas a depth component, theaspectMaskmember ofpSubresourcemust containIMAGE_ASPECT_DEPTH_BIT - If
formatof theimagehas a stencil component, theaspectMaskmember ofpSubresourcemust containIMAGE_ASPECT_STENCIL_BIT - If
formatof theimagedoes not contain a stencil or depth component, theaspectMaskmember ofpSubresourcemust not containIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BIT - If the
tilingof theimageisIMAGE_TILING_LINEARand has a multi-planar format, then theaspectMaskmember ofpSubresourcemust be a single valid multi-planar aspect mask bit - If
imagewas created with theEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROIDexternal memory handle type, thenimagemust be bound to memory - If the
tilingof theimageisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then theaspectMaskmember ofpSubresourcemust beVK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXTand the index i must be less than theDrmFormatModifierPropertiesEXT::drmFormatModifierPlaneCountassociated with the image’sformatandImageDrmFormatModifierPropertiesEXT::drmFormatModifier
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
imagemust be a validImagehandle -
pSubresourcemust be a valid pointer to a validImageSubresourcestructure -
pLayoutmust be a valid pointer to aSubresourceLayoutstructure -
imagemust have been created, allocated, or retrieved fromdevice
See Also
VK_VERSION_1_0,
Device, Image,
ImageSubresource,
SubresourceLayout
data ImageCreateInfo (es :: [Type]) Source #
VkImageCreateInfo - Structure specifying the parameters of a newly created image object
Description
Images created with tiling equal to
IMAGE_TILING_LINEAR have further
restrictions on their limits and capabilities compared to images created
with tiling equal to
IMAGE_TILING_OPTIMAL. Creation of
images with tiling IMAGE_TILING_LINEAR
may not be supported unless other parameters meet all of the
constraints:
imageTypeisIMAGE_TYPE_2Dformatis not a depth/stencil formatmipLevelsis 1arrayLayersis 1samplesisSAMPLE_COUNT_1_BITusageonly includesIMAGE_USAGE_TRANSFER_SRC_BITand/orIMAGE_USAGE_TRANSFER_DST_BIT
Images created with one of the formats that require a sampler Y′CBCR 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:
imageTypeisIMAGE_TYPE_2DmipLevelsis 1arrayLayersis 1, unless the ycbcrImageArrays feature is enabled, or otherwise indicated byImageFormatProperties::maxArrayLayers, as returned bygetPhysicalDeviceImageFormatPropertiessamplesisSAMPLE_COUNT_1_BIT
Images created with the
IMAGE_USAGE_TILE_MEMORY_BIT_QCOM
usage flag set have further restrictions on their limits and
capabilities compared to images created without this flag. Creation of
images with usage including
IMAGE_USAGE_TILE_MEMORY_BIT_QCOM
may not be supported unless parameters meet all of the constraints:
flagsis 0 or only includesIMAGE_CREATE_ALIAS_BITimageTypeisIMAGE_TYPE_2DmipLevelsis 1arrayLayersis 1samplesisSAMPLE_COUNT_1_BITtilingisIMAGE_TILING_OPTIMALusageincludesIMAGE_USAGE_TILE_MEMORY_BIT_QCOMand any valid combination of the followingIMAGE_USAGE_SAMPLED_BIT,IMAGE_USAGE_STORAGE_BIT,IMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,IMAGE_USAGE_INPUT_ATTACHMENT_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
getPhysicalDeviceFormatProperties.
If the size of the resultant image would exceed maxResourceSize, then
createImage must fail and return
ERROR_OUT_OF_DEVICE_MEMORY. This failure
may occur even when all image creation parameters satisfy their valid
usage requirements.
If the implementation reports TRUE in
PromotedStreamingTransfers.PhysicalDeviceHostImageCopyProperties'::identicalMemoryTypeRequirements,
usage of
IMAGE_USAGE_HOST_TRANSFER_BIT
must not affect the memory type requirements of the image as described
in
Sparse Resource Memory Requirements
and
Resource Memory Association.
For images created without the
IMAGE_CREATE_EXTENDED_USAGE_BIT
flag set, a usage bit is valid if it is supported for the format the
image is created with.
For images created with
IMAGE_CREATE_EXTENDED_USAGE_BIT
a usage bit is valid if it is supported for at least one of the
formats a ImageView 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,
ImageCreateInfo::arrayLayers is limited by
imageCreateMaxArrayLayers, defined below; and
ImageCreateInfo::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 ImageCreateInfo.
Let
uint64_t imageCreateDrmFormatModifiers[]be the set of Linux DRM format modifiers that the resultant image may have.- If
tilingis notIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenimageCreateDrmFormatModifiersis empty. - If
ImageCreateInfo::pNextcontainsImageDrmFormatModifierExplicitCreateInfoEXT, thenimageCreateDrmFormatModifierscontains exactly one modifier,ImageDrmFormatModifierExplicitCreateInfoEXT::drmFormatModifier. - If
ImageCreateInfo::pNextcontainsImageDrmFormatModifierListCreateInfoEXT, thenimageCreateDrmFormatModifierscontains the entire arrayImageDrmFormatModifierListCreateInfoEXT::pDrmFormatModifiers.
- If
Let
VkBool32 imageCreateMaybeLinearindicate if the resultant image may be linear.- If
tilingisIMAGE_TILING_LINEAR, thenimageCreateMaybeLinearisTRUE. - If
tilingisIMAGE_TILING_OPTIMAL, thenimageCreateMaybeLinearisFALSE. - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenimageCreateMaybeLinearisTRUEif and only ifimageCreateDrmFormatModifierscontainsDRM_FORMAT_MOD_LINEAR.
- If
Let
VkFormatFeatureFlags imageCreateFormatFeaturesbe the set of valid format features available during image creation.- If
tilingisIMAGE_TILING_LINEAR, thenimageCreateFormatFeaturesis the value ofFormatProperties::linearTilingFeaturesfound by callinggetPhysicalDeviceFormatPropertieswith parameterformatequal toImageCreateInfo::format. - If
tilingisIMAGE_TILING_OPTIMAL, and if thepNextchain includes noExternalFormatANDROIDorExternalFormatQNXstructure with non-zeroexternalFormat, thenimageCreateFormatFeaturesis the value ofFormatProperties::optimalTilingFeaturesfound by callinggetPhysicalDeviceFormatPropertieswith parameterformatequal toImageCreateInfo::format. - If
tilingisIMAGE_TILING_OPTIMAL, and if thepNextchain includes aExternalFormatANDROIDstructure with non-zeroexternalFormat, thenimageCreateFormatFeaturesis the value ofAndroidHardwareBufferFormatPropertiesANDROID::formatFeaturesobtained bygetAndroidHardwareBufferPropertiesANDROIDwith a matchingexternalFormatvalue. - If
tilingisIMAGE_TILING_OPTIMAL, and if thepNextchain includes aExternalFormatQNXstructure with non-zeroexternalFormat, thenimageCreateFormatFeaturesis the value ofScreenBufferFormatPropertiesQNX::formatFeaturesobtained bygetScreenBufferPropertiesQNXwith a matchingexternalFormatvalue. - If the
pNextchain includes aBufferCollectionImageCreateInfoFUCHSIAstructure, thenimageCreateFormatFeaturesis the value ofBufferCollectionPropertiesFUCHSIA::formatFeaturesfound by callinggetBufferCollectionPropertiesFUCHSIAwith a parametercollectionequal toBufferCollectionImageCreateInfoFUCHSIA::collection - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the value ofimageCreateFormatFeaturesis found by callinggetPhysicalDeviceFormatProperties2withImageFormatProperties::formatequal toImageCreateInfo::formatand withDrmFormatModifierPropertiesListEXTchained intoFormatProperties2; by collecting all members of the returned arrayDrmFormatModifierPropertiesListEXT::pDrmFormatModifierPropertieswhosedrmFormatModifierbelongs toimageCreateDrmFormatModifiers; and by taking the bitwise intersection, over the collected array members, ofdrmFormatModifierTilingFeatures. (The resultantimageCreateFormatFeaturesmay be empty).
- If
Let
VkImageFormatProperties2 imageCreateImageFormatPropertiesList[]be defined as follows.If
ImageCreateInfo::pNextcontains noExternalFormatANDROIDorExternalFormatQNXstructure with non-zeroexternalFormat, thenimageCreateImageFormatPropertiesListis the list of structures obtained by callinggetPhysicalDeviceImageFormatProperties2, possibly multiple times, as follows:- The parameters
PhysicalDeviceImageFormatInfo2::format,imageType,tiling,usage, andflagsmust be equal to those inImageCreateInfo. - If
ImageCreateInfo::pNextcontains aExternalMemoryImageCreateInfostructure whosehandleTypesis not0, thenPhysicalDeviceImageFormatInfo2::pNextmust contain aPhysicalDeviceExternalImageFormatInfostructure whosehandleTypeis not0; andgetPhysicalDeviceImageFormatProperties2must be called for each handle type inExternalMemoryImageCreateInfo::handleTypes, successively settingPhysicalDeviceExternalImageFormatInfo::handleTypeon each call. - If
ImageCreateInfo::pNextcontains noExternalMemoryImageCreateInfostructure, or contains a structure whosehandleTypesis0, thenPhysicalDeviceImageFormatInfo2::pNextmust either contain noPhysicalDeviceExternalImageFormatInfostructure, or contain a structure whosehandleTypeis0. - If
ImageCreateInfo::pNextcontains a VkVideoProfileListInfoKHR structure thenPhysicalDeviceImageFormatInfo2::pNextmust also contain the same VkVideoProfileListInfoKHR structure on each call. If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then:PhysicalDeviceImageFormatInfo2::pNextmust contain aPhysicalDeviceImageDrmFormatModifierInfoEXTstructure wheresharingModeis equal toImageCreateInfo::sharingMode;- if
sharingModeisSHARING_MODE_CONCURRENT, thenqueueFamilyIndexCountandpQueueFamilyIndicesmust be equal to those inImageCreateInfo; - if
flagscontainsIMAGE_CREATE_MUTABLE_FORMAT_BIT, then theImageFormatListCreateInfostructure included in thepNextchain ofPhysicalDeviceImageFormatInfo2must be equivalent to the one included in thepNextchain ofImageCreateInfo; - if
ImageCreateInfo::pNextcontains aImageCompressionControlEXTstructure, then thePhysicalDeviceImageFormatInfo2::pNextchain must contain an equivalent structure; getPhysicalDeviceImageFormatProperties2must be called for each modifier inimageCreateDrmFormatModifiers, successively settingPhysicalDeviceImageDrmFormatModifierInfoEXT::drmFormatModifieron each call.
- If
tilingis notIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenPhysicalDeviceImageFormatInfo2::pNextmust contain noPhysicalDeviceImageDrmFormatModifierInfoEXTstructure. - If any call to
getPhysicalDeviceImageFormatProperties2returns an error, thenimageCreateImageFormatPropertiesListis defined to be the empty list.
- The parameters
If
ImageCreateInfo::pNextcontains aExternalFormatANDROIDstructure with non-zeroexternalFormat, thenimageCreateImageFormatPropertiesListcontains a single element where:ImageFormatProperties::maxMipLevelsis ⌊log2(max(extent.width,extent.height,extent.depth))⌋ + 1.ImageFormatProperties::maxArrayLayersisPhysicalDeviceLimits::maxImageArrayLayers.- Each component of
ImageFormatProperties::maxExtentisPhysicalDeviceLimits::maxImageDimension2D. ImageFormatProperties::sampleCountscontains exactlySAMPLE_COUNT_1_BIT.
- Let
uint32_t imageCreateMaxMipLevelsbe the minimum value ofImageFormatProperties::maxMipLevelsinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. - Let
uint32_t imageCreateMaxArrayLayersbe the minimum value ofImageFormatProperties::maxArrayLayersinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. - Let
VkExtent3D imageCreateMaxExtentbe the component-wise minimum over allImageFormatProperties::maxExtentvalues inimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. - Let
VkSampleCountFlags imageCreateSampleCountsbe the intersection of eachImageFormatProperties::sampleCountsinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. Let
VkVideoFormatPropertiesKHR videoFormatProperties[]be defined as follows.- If
ImageCreateInfo::pNextcontains a VkVideoProfileListInfoKHR structure, thenvideoFormatPropertiesis the list of structures obtained by calling vkGetPhysicalDeviceVideoFormatPropertiesKHR with VkPhysicalDeviceVideoFormatInfoKHR::imageUsageequal to theusagemember ofImageCreateInfoand VkPhysicalDeviceVideoFormatInfoKHR::pNextcontaining the same VkVideoProfileListInfoKHR structure chained toImageCreateInfo. - If
ImageCreateInfo::pNextcontains no VkVideoProfileListInfoKHR structure, thenvideoFormatPropertiesis an empty list.
- If
Let
VkBool32 supportedVideoFormatindicate if the image parameters are supported by the specified video profiles.supportedVideoFormatisTRUEif there exists an element in thevideoFormatPropertieslist for which all of the following conditions are true:ImageCreateInfo::formatequals VkVideoFormatPropertiesKHR::format.ImageCreateInfo::flagsonly contains VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and/or bits also set in VkVideoFormatPropertiesKHR::imageCreateFlags.ImageCreateInfo::imageTypeequals VkVideoFormatPropertiesKHR::imageType.ImageCreateInfo::tilingequals VkVideoFormatPropertiesKHR::imageTiling.ImageCreateInfo::usageonly contains bits also set in VkVideoFormatPropertiesKHR::imageUsageFlags, orImageCreateInfo::flagsincludesIMAGE_CREATE_EXTENDED_USAGE_BIT.
- Otherwise
supportedVideoFormatisFALSE.
Valid Usage
- Each of the
following values (as described in
Image Creation Limits)
must not be undefined :
imageCreateMaxMipLevels,imageCreateMaxArrayLayers,imageCreateMaxExtent, andimageCreateSampleCounts
- If
sharingModeisSHARING_MODE_CONCURRENT,pQueueFamilyIndicesmust be a valid pointer to an array ofqueueFamilyIndexCountuint32_tvalues - If
sharingModeisSHARING_MODE_CONCURRENT,queueFamilyIndexCountmust be greater than1 - If
sharingModeisSHARING_MODE_CONCURRENT, each element ofpQueueFamilyIndicesmust be unique and must be less thanpQueueFamilyPropertyCountreturned by eithergetPhysicalDeviceQueueFamilyPropertiesorgetPhysicalDeviceQueueFamilyProperties2for thephysicalDevicethat was used to createdevice - If the
pNextchain includes aExternalFormatANDROIDstructure, and itsexternalFormatmember is non-zero theformatmust beFORMAT_UNDEFINED - If the
pNextchain does not include aExternalFormatANDROIDstructure, or does and itsexternalFormatmember is0, theformatmust not beFORMAT_UNDEFINED -
extent.widthmust be greater than0 -
extent.heightmust be greater than0 -
extent.depthmust be greater than0 -
mipLevelsmust be greater than0 -
arrayLayersmust be greater than0 - If
flagscontainsIMAGE_CREATE_CUBE_COMPATIBLE_BIT,imageTypemust beIMAGE_TYPE_2D - If
flagscontainsIMAGE_CREATE_CUBE_COMPATIBLE_BIT,extent.widthandextent.heightmust be equal - If
flagscontainsIMAGE_CREATE_CUBE_COMPATIBLE_BIT,arrayLayersmust be greater than or equal to 6 - If the
zeroInitializeDeviceMemory
feature is not enabled,
initialLayoutmust not beIMAGE_LAYOUT_ZERO_INITIALIZED_EXT - If
flagscontainsIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,imageTypemust beIMAGE_TYPE_2D - If
flagscontainsIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,imageTypemust beIMAGE_TYPE_3D - If
flagscontainsIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,flagsmust not includeIMAGE_CREATE_SPARSE_ALIASED_BIT,IMAGE_CREATE_SPARSE_BINDING_BIT, orIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If
flagscontainsIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT,imageTypemust beIMAGE_TYPE_3D - If
flagscontainsIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXTand either the maintenance9 feature is not enabled on the device or image2DViewOf3DSparse isFALSE,flagsmust not includeIMAGE_CREATE_SPARSE_ALIASED_BIT,IMAGE_CREATE_SPARSE_BINDING_BIT, orIMAGE_CREATE_SPARSE_RESIDENCY_BIT -
extent.widthmust be less than or equal toimageCreateMaxExtent.width(as defined in Image Creation Limits) -
extent.heightmust be less than or equal toimageCreateMaxExtent.height(as defined in Image Creation Limits) -
extent.depthmust be less than or equal toimageCreateMaxExtent.depth(as defined in Image Creation Limits) - If
imageTypeisIMAGE_TYPE_1D, bothextent.heightandextent.depthmust be1 - If
imageTypeisIMAGE_TYPE_2D,extent.depthmust be1 -
mipLevelsmust be less than or equal to the number of levels in the complete mipmap chain based onextent.width,extent.height, andextent.depth -
mipLevelsmust be less than or equal toimageCreateMaxMipLevels(as defined in Image Creation Limits) -
arrayLayersmust be less than or equal toimageCreateMaxArrayLayers(as defined in Image Creation Limits) - If
imageTypeisIMAGE_TYPE_3D,arrayLayersmust be1 - If
samplesis notSAMPLE_COUNT_1_BIT, thenimageTypemust beIMAGE_TYPE_2D,flagsmust not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT,mipLevelsmust be equal to1, andimageCreateMaybeLinear(as defined in Image Creation Limits) must beFALSE, - If
samplesis notSAMPLE_COUNT_1_BIT,usagemust not containIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT - If
usageincludesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other thanIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, andIMAGE_USAGE_INPUT_ATTACHMENT_BITmust not be set - If
usageincludesIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.widthmust be less than or equal toPhysicalDeviceLimits::maxFramebufferWidth - If
usageincludesIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.heightmust be less than or equal toPhysicalDeviceLimits::maxFramebufferHeight - If the
fragmentDensityMapOffset
feature is not enabled and
usageincludesIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,extent.widthmust be less than or equal to \(\left\lceil{\frac{maxFramebufferWidth}{minFragmentDensityTexelSize_{width}}}\right\rceil\) - If the
fragmentDensityMapOffset
feature is not enabled and
usageincludesIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,extent.heightmust be less than or equal to \(\left\lceil{\frac{maxFramebufferHeight}{minFragmentDensityTexelSize_{height}}}\right\rceil\) - If
usageincludesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT,usagemust also contain at least one ofIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT -
samplesmust be a validSampleCountFlagBitsvalue that is set inimageCreateSampleCounts(as defined in Image Creation Limits) - If the
shaderStorageImageMultisample
feature is not enabled, and
usagecontainsIMAGE_USAGE_STORAGE_BIT,samplesmust beSAMPLE_COUNT_1_BIT - If the
sparseBinding
feature is not enabled,
flagsmust not containIMAGE_CREATE_SPARSE_BINDING_BIT - If the
sparseResidencyAliased
feature is not enabled,
flagsmust not containIMAGE_CREATE_SPARSE_ALIASED_BIT - If
tilingisIMAGE_TILING_LINEAR,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If
imageTypeisIMAGE_TYPE_1D,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the
sparseResidencyImage2D
feature is not enabled, and
imageTypeisIMAGE_TYPE_2D,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the
sparseResidencyImage3D
feature is not enabled, and
imageTypeisIMAGE_TYPE_3D,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the
sparseResidency2Samples
feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_2_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the
sparseResidency4Samples
feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_4_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the
sparseResidency8Samples
feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_8_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the
sparseResidency16Samples
feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_16_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If
flagscontainsIMAGE_CREATE_SPARSE_RESIDENCY_BITorIMAGE_CREATE_SPARSE_ALIASED_BIT, it must also containIMAGE_CREATE_SPARSE_BINDING_BIT - If any of the bits
IMAGE_CREATE_SPARSE_BINDING_BIT,IMAGE_CREATE_SPARSE_RESIDENCY_BIT, orIMAGE_CREATE_SPARSE_ALIASED_BITare set,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BITmust not also be set - If the
protectedMemory
feature is not enabled,
flagsmust not containIMAGE_CREATE_PROTECTED_BIT - If any of the bits
IMAGE_CREATE_SPARSE_BINDING_BIT,IMAGE_CREATE_SPARSE_RESIDENCY_BIT, orIMAGE_CREATE_SPARSE_ALIASED_BITare set,IMAGE_CREATE_PROTECTED_BITmust not also be set - If the
pNextchain includes aExternalMemoryImageCreateInfoNVstructure, it must not contain aExternalMemoryImageCreateInfostructure - If the
pNextchain includes aExternalMemoryImageCreateInfostructure, itshandleTypesmember must only contain bits that are also inExternalImageFormatProperties::externalMemoryProperties.compatibleHandleTypes, as returned bygetPhysicalDeviceImageFormatProperties2withformat,imageType,tiling,usage, andflagsequal to those in this structure, and with aPhysicalDeviceExternalImageFormatInfostructure included in thepNextchain, with ahandleTypeequal to any one of the handle types specified inExternalMemoryImageCreateInfo::handleTypes - If the
pNextchain includes aExternalMemoryImageCreateInfoNVstructure, itshandleTypesmember must only contain bits that are also inExternalImageFormatPropertiesNV::externalMemoryFeatures.compatibleHandleTypes, as returned bygetPhysicalDeviceExternalImageFormatPropertiesNVwithformat,imageType,tiling,usage, andflagsequal to those in this structure, and withexternalHandleTypeequal to any one of the handle types specified inExternalMemoryImageCreateInfoNV::handleTypes - If the logical
device was created with
DeviceGroupDeviceCreateInfo::physicalDeviceCountequal to 1,flagsmust not containIMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT - If
flagscontainsIMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, thenmipLevelsmust be one,arrayLayersmust be one,imageTypemust beIMAGE_TYPE_2D, andimageCreateMaybeLinear(as defined in Image Creation Limits) must beFALSE - If
flagscontainsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, thenformatmust be a compressed image format - If
flagscontainsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, thenflagsmust also containIMAGE_CREATE_MUTABLE_FORMAT_BIT -
initialLayoutmust beIMAGE_LAYOUT_UNDEFINEDorIMAGE_LAYOUT_ZERO_INITIALIZED_EXTorIMAGE_LAYOUT_PREINITIALIZED - If the
pNextchain includes aExternalMemoryImageCreateInfoorExternalMemoryImageCreateInfoNVstructure whosehandleTypesmember is not0,initialLayoutmust beIMAGE_LAYOUT_UNDEFINED - If the image
formatis one of the formats that require a sampler Y′CBCR conversion,mipLevelsmust be 1 - If the image
formatis one of the formats that require a sampler Y′CBCR conversion,samplesmust beSAMPLE_COUNT_1_BIT - If the image
formatis one of the formats that require a sampler Y′CBCR conversion,imageTypemust beIMAGE_TYPE_2D - If
formatis a multi-planar format, and ifimageCreateFormatFeatures(as defined in Image Creation Limits) does not containFORMAT_FEATURE_DISJOINT_BIT, thenflagsmust not containIMAGE_CREATE_DISJOINT_BIT - If
formatis not a multi-planar format, andflagsdoes not includeIMAGE_CREATE_ALIAS_BIT,flagsmust not containIMAGE_CREATE_DISJOINT_BIT - If
formathas a_422or_420suffix,extent.widthmust be a multiple of 2 - If
formathas a_420suffix,extent.heightmust be a multiple of 2 - If
formatis one of theVK_FORMAT_PVRTC1_*_IMGformats,extent.widthmust be a power of 2 - If
formatis one of theVK_FORMAT_PVRTC1_*_IMGformats,extent.heightmust be a power of 2 - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then thepNextchain must include exactly one ofImageDrmFormatModifierListCreateInfoEXTorImageDrmFormatModifierExplicitCreateInfoEXTstructures - If the
pNextchain includes aImageDrmFormatModifierListCreateInfoEXTorImageDrmFormatModifierExplicitCreateInfoEXTstructure, thentilingmust beIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXTandflagscontainsIMAGE_CREATE_MUTABLE_FORMAT_BIT, then thepNextchain must include aImageFormatListCreateInfostructure with non-zeroviewFormatCount - If
flagscontainsIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTformatmust be a depth or depth/stencil format - If the
pNextchain includes aExternalMemoryImageCreateInfostructure whosehandleTypesmember includesEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,imageTypemust beIMAGE_TYPE_2D - If the
pNextchain includes aExternalMemoryImageCreateInfostructure whosehandleTypesmember includesEXTERNAL_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 - If the
pNextchain includes aExternalFormatANDROIDstructure whoseexternalFormatmember is not0,flagsmust not includeIMAGE_CREATE_MUTABLE_FORMAT_BIT - If the
pNextchain includes aExternalFormatANDROIDstructure whoseexternalFormatmember is not0,usagemust not include any usages exceptIMAGE_USAGE_INPUT_ATTACHMENT_BIT,IMAGE_USAGE_COLOR_ATTACHMENT_BIT, orIMAGE_USAGE_SAMPLED_BIT - If the
pNextchain includes aExternalFormatANDROIDstructure whoseexternalFormatmember is not0, and externalFormatResolve feature is not enabled,usagemust not includeIMAGE_USAGE_INPUT_ATTACHMENT_BITorIMAGE_USAGE_COLOR_ATTACHMENT_BIT - If the
pNextchain includes aExternalFormatANDROIDstructure whoseexternalFormatmember is not0,tilingmust beIMAGE_TILING_OPTIMAL - If the
pNextchain includes aExternalMemoryImageCreateInfostructure whosehandleTypesmember includesEXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX,imageTypemust beIMAGE_TYPE_2D - If the
pNextchain includes aExternalMemoryImageCreateInfostructure whosehandleTypesmember includesEXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX,mipLevelsmust either be1or equal to the number of levels in the complete mipmap chain based onextent.width,extent.height, andextent.depth - If the
pNextchain includes aExternalFormatQNXstructure whoseexternalFormatmember is not0,flagsmust not includeIMAGE_CREATE_MUTABLE_FORMAT_BIT - If the
pNextchain includes aExternalFormatQNXstructure whoseexternalFormatmember is not0,usagemust not include any usages exceptIMAGE_USAGE_SAMPLED_BIT - If the
pNextchain includes aExternalFormatQNXstructure whoseexternalFormatmember is not0,tilingmust beIMAGE_TILING_OPTIMAL - If
formatis a depth-stencil format,usageincludesIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and thepNextchain includes aImageStencilUsageCreateInfostructure, then itsImageStencilUsageCreateInfo::stencilUsagemember must also includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT - If
formatis a depth-stencil format,usagedoes not includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and thepNextchain includes aImageStencilUsageCreateInfostructure, then itsImageStencilUsageCreateInfo::stencilUsagemember must also not includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT - If
formatis a depth-stencil format,usageincludesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and thepNextchain includes aImageStencilUsageCreateInfostructure, then itsImageStencilUsageCreateInfo::stencilUsagemember must also includeIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT - If
formatis a depth-stencil format,usagedoes not includeIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and thepNextchain includes aImageStencilUsageCreateInfostructure, then itsImageStencilUsageCreateInfo::stencilUsagemember must also not includeIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT - If
Formatis a depth-stencil format and thepNextchain includes aImageStencilUsageCreateInfostructure with itsstencilUsagemember includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.widthmust be less than or equal toPhysicalDeviceLimits::maxFramebufferWidth - If
formatis a depth-stencil format and thepNextchain includes aImageStencilUsageCreateInfostructure with itsstencilUsagemember includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.heightmust be less than or equal toPhysicalDeviceLimits::maxFramebufferHeight - If the
shaderStorageImageMultisample
feature is not enabled,
formatis a depth-stencil format and thepNextchain includes aImageStencilUsageCreateInfostructure with itsstencilUsageincludingIMAGE_USAGE_STORAGE_BIT,samplesmust beSAMPLE_COUNT_1_BIT - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV,imageTypemust beIMAGE_TYPE_2DorIMAGE_TYPE_3D - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV, it must not containIMAGE_CREATE_CUBE_COMPATIBLE_BITand theformatmust not be a depth/stencil format - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NVandimageTypeisIMAGE_TYPE_2D,extent.widthandextent.heightmust be greater than1 - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NVandimageTypeisIMAGE_TYPE_3D,extent.width,extent.height, andextent.depthmust be greater than1 - If
usageincludesIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,imageTypemust beIMAGE_TYPE_2D - If
usageincludesIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,samplesmust beSAMPLE_COUNT_1_BIT - If the
shadingRateImage
feature is enabled and
usageincludesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,tilingmust beIMAGE_TILING_OPTIMAL - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,tilingmust beIMAGE_TILING_OPTIMAL - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,imageTypemust beIMAGE_TYPE_2D - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,flagsmust not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,mipLevelsmust be1 - If
usageincludesIMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI,tilingmust beIMAGE_TILING_LINEAR - If the
VK_KHR_portability_subsetextension is enabled, andPhysicalDevicePortabilitySubsetFeaturesKHR::imageView2DOn3DImageisFALSE,flagsmust not containIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT - If the
VK_KHR_portability_subsetextension is enabled, andPhysicalDevicePortabilitySubsetFeaturesKHR::multisampleArrayImageisFALSE, andsamplesis notSAMPLE_COUNT_1_BIT, thenarrayLayersmust be1 - If a
ImageFormatListCreateInfostructure was included in thepNextchain andformatis not a multi-planar format andImageFormatListCreateInfo::viewFormatCountis not zero, then each format inImageFormatListCreateInfo::pViewFormatsmust either be compatible with theformatas described in the compatibility table or, ifflagscontainsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, be an uncompressed format that is size-compatible withformat - If a
ImageFormatListCreateInfostructure was included in thepNextchain andformatis a multi-planar format andflagscontainsIMAGE_CREATE_MUTABLE_FORMAT_BITandImageFormatListCreateInfo::viewFormatCountis not zero, then each format inImageFormatListCreateInfo::pViewFormatsmust be compatible with theFormatfor the plane of the image format - If
flagsdoes not containIMAGE_CREATE_MUTABLE_FORMAT_BITand thepNextchain includes aImageFormatListCreateInfostructure, thenImageFormatListCreateInfo::viewFormatCountmust be0or1 - If
usageincludes VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, andflagsdoes not include VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then thepNextchain must include a VkVideoProfileListInfoKHR structure withprofileCountgreater than0andpProfilesincluding at least one VkVideoProfileInfoKHR structure with avideoCodecOperationmember specifying a decode operation - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, andflagsdoes not include VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then thepNextchain must include a VkVideoProfileListInfoKHR structure withprofileCountgreater than0andpProfilesincluding at least one VkVideoProfileInfoKHR structure with avideoCodecOperationmember specifying an encode operation - If
flagsincludes VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then videoMaintenance1 must be enabled - If
flagsincludes VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR andusagedoes not include VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, thenusagemust not include VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR - If
flagsincludes VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, thenusagemust not include VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, or VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR - If the
pNextchain includes a VkVideoProfileListInfoKHR structure withprofileCountgreater than0, thensupportedVideoFormatmust beTRUE - If the
pNextchain includes a VkVideoProfileListInfoKHR structure and for any element of itspProfilesmembervideoCodecOperationis VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the videoDecodeVP9 feature must be enabled - If the
pNextchain includes a VkVideoProfileListInfoKHR structure and for any element of itspProfilesmembervideoCodecOperationis VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the videoEncodeAV1 feature must be enabled - If the
pNextchain includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the videoEncodeRgbConversion feature must be enabled - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then the videoEncodeQuantizationMap feature must be enabled - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR,imageTypemust beIMAGE_TYPE_2D - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR,samplesmust beSAMPLE_COUNT_1_BIT - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then thepNextchain must include a VkVideoProfileListInfoKHR structure withprofileCountequal to1andpProfilespointing to a VkVideoProfileInfoKHR structure with avideoCodecOperationmember specifying an encode operation - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then VkVideoEncodeCapabilitiesKHR::flagsmust include VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in thepProfilesmember of the VkVideoProfileListInfoKHR structure included in thepNextchain - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then VkVideoEncodeCapabilitiesKHR::flagsmust include VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in thepProfilesmember of the VkVideoProfileListInfoKHR structure included in thepNextchain - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR,extent.widthmust be less than or equal to VkVideoEncodeQuantizationMapCapabilitiesKHR::maxQuantizationMapExtent.width, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in thepProfilesmember of the VkVideoProfileListInfoKHR structure included in thepNextchain - If
usageincludes VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR,extent.heightmust be less than or equal to VkVideoEncodeQuantizationMapCapabilitiesKHR::maxQuantizationMapExtent.height, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in thepProfilesmember of the VkVideoProfileListInfoKHR structure included in thepNextchain - If the
Imageis to be used to import memory from aBufferCollectionFUCHSIA, aBufferCollectionImageCreateInfoFUCHSIAstructure must be chained topNext - If
the
multisampledRenderToSingleSampled
feature is not enabled,
flagsmust not containIMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT - If
flagscontainsIMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT,samplesmust beSAMPLE_COUNT_1_BIT - If the
pNextchain includes aImageCompressionControlEXTstructure,formatis a multi-planar format, andImageCompressionControlEXT::flagsincludesIMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, thenImageCompressionControlEXT::compressionControlPlaneCountmust be equal to the number of planes informat - If the
pNextchain includes aImageCompressionControlEXTstructure,formatis not a multi-planar format, andImageCompressionControlEXT::flagsincludesIMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, thenImageCompressionControlEXT::compressionControlPlaneCountmust be 1 - If the
pNextchain includes aImageCompressionControlEXTstructure, it must not contain aImageDrmFormatModifierExplicitCreateInfoEXTstructure - If
flagsincludesIMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT, the descriptorBufferCaptureReplay or descriptorHeapCaptureReplay feature must be enabled - If the
pNextchain includes aOpaqueCaptureDescriptorDataCreateInfoEXTstructure,flagsmust containIMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT - If the
pNextchain includes aExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must be eitherEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXTorEXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT - If the
pNextchain includes aImportMetalTextureInfoEXTstructure itsplanemember must beIMAGE_ASPECT_PLANE_0_BIT,IMAGE_ASPECT_PLANE_1_BIT, orIMAGE_ASPECT_PLANE_2_BIT - If the
pNextchain includes aImportMetalTextureInfoEXTstructure and the image does not have a multi-planar format, thenImportMetalTextureInfoEXT::planemust beIMAGE_ASPECT_PLANE_0_BIT - If the
pNextchain includes aImportMetalTextureInfoEXTstructure and the image has a multi-planar format with only two planes, thenImportMetalTextureInfoEXT::planemust not beIMAGE_ASPECT_PLANE_2_BIT - If
imageCreateFormatFeatures(as defined in Image Creation Limits) does not containFORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT, thenusagemust not containIMAGE_USAGE_HOST_TRANSFER_BIT - If
usageincludesIMAGE_USAGE_HOST_TRANSFER_BIT, then the hostImageCopy feature must be enabled - If the
tileMemoryHeap
feature is not enabled,
usagemust not includeIMAGE_USAGE_TILE_MEMORY_BIT_QCOM - If the
pNextchain contains aImageAlignmentControlCreateInfoMESAstructure,tilingmust beIMAGE_TILING_OPTIMAL - If the
pNextchain contains aImageAlignmentControlCreateInfoMESAstructure, it must not contain aExternalMemoryImageCreateInfostructure - If
tilingis VK_IMAGE_TILING_LINEAR thenIMAGE_USAGE_TENSOR_ALIASING_BIT_ARMmust not be set inusage - If Vulkan 1.3 is not supported
and the
ycbcr2plane444Formats
feature is not enabled,
formatmust not beFORMAT_G8_B8R8_2PLANE_444_UNORM,FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16,FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, orFORMAT_G16_B16R16_2PLANE_444_UNORM - If
OpaqueCaptureDataCreateInfoEXT::pData is notNULL,flagsmust containIMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT - If
flagscontainsIMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT, andOpaqueCaptureDataCreateInfoEXT::pDatais notNULL,OpaqueCaptureDataCreateInfoEXT::pData->sizemust be equal to imageCaptureReplayOpaqueDataSize
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_IMAGE_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofBufferCollectionImageCreateInfoFUCHSIA,DedicatedAllocationImageCreateInfoNV,ExportMetalObjectCreateInfoEXT,ExternalFormatANDROID, VkExternalFormatOHOS,ExternalFormatQNX,ExternalMemoryImageCreateInfo,ExternalMemoryImageCreateInfoNV,ImageAlignmentControlCreateInfoMESA,ImageCompressionControlEXT,ImageDrmFormatModifierExplicitCreateInfoEXT,ImageDrmFormatModifierListCreateInfoEXT,ImageFormatListCreateInfo,ImageStencilUsageCreateInfo,ImageSwapchainCreateInfoKHR,ImportMetalIOSurfaceInfoEXT,ImportMetalTextureInfoEXT,OpaqueCaptureDataCreateInfoEXT,OpaqueCaptureDescriptorDataCreateInfoEXT,OpticalFlowImageFormatInfoNV, or VkVideoProfileListInfoKHR - The
sTypevalue of each structure in thepNextchain must be unique, with the exception of structures of typeExportMetalObjectCreateInfoEXTorImportMetalTextureInfoEXT -
flagsmust be a valid combination ofImageCreateFlagBitsvalues -
imageTypemust be a validImageTypevalue -
formatmust be a validFormatvalue -
samplesmust be a validSampleCountFlagBitsvalue -
tilingmust be a validImageTilingvalue -
usagemust be a valid combination ofImageUsageFlagBitsvalues -
usagemust not be0 -
sharingModemust be a validSharingModevalue -
initialLayoutmust be a validImageLayoutvalue
See Also
VK_VERSION_1_0,
DeviceImageMemoryRequirements,
DeviceImageSubresourceInfo,
Extent3D,
Format,
ImageCreateFlags,
ImageFormatConstraintsInfoFUCHSIA,
ImageLayout,
ImageTiling,
ImageType,
ImageUsageFlags,
SampleCountFlagBits,
SharingMode,
StructureType, createImage
Constructors
| ImageCreateInfo | |
Fields
| |
Instances
data SubresourceLayout Source #
VkSubresourceLayout - Structure specifying subresource layout
Description
If the image is
linear,
then rowPitch, arrayPitch and depthPitch describe the layout of
the image subresource in linear memory. For uncompressed formats,
rowPitch is the number of bytes between texels with the same x
coordinate in adjacent rows (y coordinates differ by one). arrayPitch
is the number of bytes between texels with the same x and y coordinate
in adjacent array layers of the image (array layer values differ by
one). depthPitch is the number of bytes between texels with the same x
and y coordinate in adjacent slices of a 3D image (z coordinates differ
by one). Expressed as an addressing formula, the starting byte of a
texel in the image subresource has address:
// (x,y,z,layer) are in texel coordinates address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*elementSize + offset
For compressed formats, the rowPitch is the number of bytes between
compressed texel blocks in adjacent rows. arrayPitch is the number of
bytes between compressed texel blocks in adjacent array layers.
depthPitch is the number of bytes between compressed texel blocks in
adjacent slices of a 3D image.
// (x,y,z,layer) are in compressed texel block coordinates address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*compressedTexelBlockByteSize + offset;
The value of arrayPitch is undefined for images that were not created
as arrays. depthPitch is defined only for 3D images.
If the image has a single-plane color format and its tiling is
IMAGE_TILING_LINEAR , then the
aspectMask member of
ImageSubresource must
be IMAGE_ASPECT_COLOR_BIT.
If the image has a depth/stencil format and its tiling is
IMAGE_TILING_LINEAR , then
aspectMask must be either
IMAGE_ASPECT_DEPTH_BIT or
IMAGE_ASPECT_STENCIL_BIT. On
implementations that store depth and stencil aspects separately,
querying each of these image subresource layouts will return a different
offset and size representing the region of memory used for that
aspect. On implementations that store depth and stencil aspects
interleaved, the same offset and size are returned and represent the
interleaved memory allocation.
If the image has a
multi-planar format
and its tiling is IMAGE_TILING_LINEAR
, then the aspectMask member of
ImageSubresource must
be IMAGE_ASPECT_PLANE_0_BIT,
IMAGE_ASPECT_PLANE_1_BIT, or
(for 3-plane formats only)
IMAGE_ASPECT_PLANE_2_BIT.
Querying each of these image subresource layouts will return a different
offset and size representing the region of memory used for that
plane. If the image is disjoint, then the offset is relative to the
base address of the plane. If the image is non-disjoint, then the
offset is relative to the base address of the image.
If the image’s tiling is
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
then the aspectMask member of
ImageSubresource must
be one of VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT, where the maximum
allowed plane index i is defined by the
DrmFormatModifierPropertiesEXT::drmFormatModifierPlaneCount
associated with the image’s ImageCreateInfo::format and
modifier.
The memory range used by the subresource is described by offset and
size. If the image is disjoint, then the offset is relative to the
base address of the memory plane. If the image is non-disjoint, then
the offset is relative to the base address of the image. If the image
is
non-linear,
then rowPitch, arrayPitch, and depthPitch have an
implementation-dependent meaning.
See Also
VK_VERSION_1_0,
DeviceSize,
ImageDrmFormatModifierExplicitCreateInfoEXT,
SubresourceLayout2,
getImageSubresourceLayout
Constructors
| SubresourceLayout | |
Fields
| |
Instances
VkImage - Opaque handle to an image object
See Also
VK_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_VERSION_1_0,
BindImageMemoryInfo,
BlitImageInfo2,
CopyBufferToImageInfo2,
CopyImageInfo2,
CopyImageToBufferInfo2,
PromotedStreamingTransfers.CopyImageToImageInfo',
PromotedStreamingTransfers.CopyImageToMemoryInfo',
CopyMemoryToImageIndirectInfoKHR,
PromotedStreamingTransfers.CopyMemoryToImageInfo',
DedicatedAllocationMemoryAllocateInfoNV,
ExportMetalIOSurfaceInfoEXT,
ExportMetalTextureInfoEXT,
FrameBoundaryEXT,
PromotedStreamingTransfers.HostImageLayoutTransitionInfo',
ImageCaptureDescriptorDataInfoEXT,
ImageMemoryBarrier,
ImageMemoryBarrier2,
ImageMemoryRequirementsInfo2,
ImageSparseMemoryRequirementsInfo2,
ImageViewCreateInfo,
MemoryDedicatedAllocateInfo,
ResolveImageInfo2,
SparseImageMemoryBindInfo,
SparseImageOpaqueMemoryBindInfo,
bindImageMemory,
cmdBlitImage,
cmdClearColorImage,
cmdClearDepthStencilImage,
cmdCopyBufferToImage,
cmdCopyImage,
cmdCopyImageToBuffer,
cmdCopyMemoryToImageIndirectNV,
cmdResolveImage,
createImage, destroyImage,
getImageDrmFormatModifierPropertiesEXT,
getImageMemoryRequirements,
getImageOpaqueCaptureDataEXT,
getImageSparseMemoryRequirements,
getImageSubresourceLayout,
getImageSubresourceLayout2,
getImageSubresourceLayout2,
getImageSubresourceLayout2,
getSwapchainImagesKHR
Instances
| Eq Image Source # | |
| Ord Image Source # | |
| Storable Image Source # | |
| Show Image Source # | |
| HasObjectType Image Source # | |
Defined in Vulkan.Core10.Handles Methods objectTypeAndHandle :: Image -> (ObjectType, Word64) Source # | |
| IsHandle Image Source # | |
Defined in Vulkan.Core10.Handles | |
| Zero Image Source # | |
Defined in Vulkan.Core10.Handles | |
newtype ImageLayout Source #
VkImageLayout - Layout of image and image subresources
Description
The type(s) of device access supported by each layout are:
IMAGE_LAYOUT_UNDEFINEDspecifies that the layout is unknown. Image memory cannot be transitioned into this layout. This layout can be used as theinitialLayoutmember ofImageCreateInfo. This layout can be used in place of the current image layout in a layout transition, but doing so will cause the contents of the image’s memory to be undefined.IMAGE_LAYOUT_PREINITIALIZEDspecifies that an image’s memory is in a defined layout and can be populated by data, but that it has not yet been initialized by the driver. Image memory cannot be transitioned into this layout. This layout can be used as theinitialLayoutmember ofImageCreateInfo. This layout is intended to be used as the initial layout for an image whose contents are written by the host, and hence the data can be written to memory immediately, without first executing a layout transition. Currently,IMAGE_LAYOUT_PREINITIALIZEDis only useful with linear images because there is not a standard layout defined forIMAGE_TILING_OPTIMALimages.IMAGE_LAYOUT_GENERALsupports all types of device access, unless specified otherwise.IMAGE_LAYOUT_ZERO_INITIALIZED_EXTspecifies that an image’s memory is in a defined layout and is zeroed, but that it has not yet been initialized by the driver. Image memory cannot be transitioned into this layout. This layout can be used as theinitialLayoutmember ofImageCreateInfo. This layout is intended to be used as the initial layout for an image whose contents are already zeroed, either from being explicitly set to zero by an application or from being allocated withMEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT.IMAGE_LAYOUT_ATTACHMENT_OPTIMALspecifies a layout that must only be used with attachment accesses in the graphics pipeline.IMAGE_LAYOUT_READ_ONLY_OPTIMALspecifies a layout allowing read only access as an attachment, or in shaders as a sampled image, combined image/sampler, or input attachment.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALmust only be used as a color or resolve attachment in aFramebuffer. This layout is valid only for image subresources of images created with theIMAGE_USAGE_COLOR_ATTACHMENT_BITusage flag set.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALspecifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read and write access as a depth/stencil attachment. It is equivalent toIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALandIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALspecifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read only access as a depth/stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent toIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALandIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALspecifies a layout for depth/stencil format images allowing read and write access to the stencil aspect as a stencil attachment, and read only access to the depth aspect as a depth attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent toIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALandIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMALspecifies a layout for depth/stencil format images allowing read and write access to the depth aspect as a depth attachment, and read only access to the stencil aspect as a stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent toIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALandIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALspecifies a layout for the depth aspect of a depth/stencil format image allowing read and write access as a depth attachment.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALspecifies a layout for the depth aspect of a depth/stencil format image allowing read-only access as a depth attachment or in shaders as a sampled image, combined image/sampler, or input attachment.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALspecifies a layout for the stencil aspect of a depth/stencil format image allowing read and write access as a stencil attachment.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALspecifies a layout for the stencil aspect of a depth/stencil format image allowing read-only access as a stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALspecifies a layout allowing read-only access in a shader as a sampled image, combined image/sampler, or input attachment. This layout is valid only for image subresources of images created with theIMAGE_USAGE_SAMPLED_BITorIMAGE_USAGE_INPUT_ATTACHMENT_BITusage bits enabled.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMALmust only be used as a source image of a transfer command (see the definition of https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#synchronization-pipeline-stages-transfer). This layout is valid only for image subresources of images created with theIMAGE_USAGE_TRANSFER_SRC_BITusage flag set.IMAGE_LAYOUT_TRANSFER_DST_OPTIMALmust only be used as a destination image of a transfer command. This layout is valid only for image subresources of images created with theIMAGE_USAGE_TRANSFER_DST_BITusage flag set.IMAGE_LAYOUT_PRESENT_SRC_KHRmust only be used for presenting a presentable image for display.IMAGE_LAYOUT_SHARED_PRESENT_KHRis valid only for shared presentable images, and must be used for any usage the image supports.IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHRmust only be used as a fragment shading rate attachment or shading rate image. This layout is valid only for image subresources of images created with theIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHRusage flag set.IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXTmust only be used as a fragment density map attachment in aRenderPass. This layout is valid only for image subresources of images created with theIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXTusage flag set.- VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR must only be used as a decode output picture in a video decode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage flag set.
- VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR is reserved for future use.
- VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR must only be used as an output reconstructed picture or an input reference picture in a video decode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage flag set.
- VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR is reserved for future use.
- VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR must only be used as an encode input picture in a video encode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage flag set.
- VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR must only be used as an output reconstructed picture or an input reference picture in a video encode operation. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage flag set.
IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXTmust only be used as either a color attachment or depth/stencil attachment and/or read-only access in a shader as a sampled image, combined image/sampler, or input attachment. This layout is valid only for image subresources of images created with theIMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXTusage flag set, and either theIMAGE_USAGE_COLOR_ATTACHMENT_BITorIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITusage flags set, and either theIMAGE_USAGE_INPUT_ATTACHMENT_BITorIMAGE_USAGE_SAMPLED_BITusage flags setIMAGE_LAYOUT_RENDERING_LOCAL_READmust only be used as either a storage image, or a color or depth/stencil attachment and an input attachment. This layout is valid only for image subresources of images created with either theIMAGE_USAGE_STORAGE_BITusage flag set, or both theIMAGE_USAGE_INPUT_ATTACHMENT_BITand either of theIMAGE_USAGE_COLOR_ATTACHMENT_BITorIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITusage flags set.- VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR must only be used as a quantization map in a video encode operation. This layout is valid only for image subresources of images 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.
IMAGE_LAYOUT_TENSOR_ALIASING_ARMspecifies the layout that an image created withIMAGE_TILING_OPTIMALmust be in, if the unifiedImageLayouts feature is disabled, or may be in if it is enabled, for it and a tensor bound to the same aliased range of memory to consistently interpret the data in memory. See https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#resources-memory-aliasing for a complete set of rules for tensor/image aliasing. This layout is valid only for image subresources of images created with theIMAGE_USAGE_TENSOR_ALIASING_BIT_ARMusage flag set.
The layout of each image subresource is not a state of the image
subresource itself, but is rather a property of how the data in memory
is organized, and thus for each mechanism of accessing an image in the
API the application must specify a parameter or structure member that
indicates which image layout the image subresource(s) are considered to
be in when the image will be accessed. For transfer commands, this is a
parameter to the command (see
https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#clears
and
https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#copies).
For use as a framebuffer attachment, this is a member in the
substructures of the RenderPassCreateInfo (see
Render Pass).
For use in a descriptor set, this is a member in the
DescriptorImageInfo structure (see
https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-updates).
If the
unifiedImageLayouts
feature is enabled, the IMAGE_LAYOUT_GENERAL image layout may be
used in place of the other layouts where allowed with no loss of
performance.
IMAGE_LAYOUT_GENERAL can be a useful catch-all image layout, but there
are situations where a dedicated image layout must be used instead. Some
examples include:
IMAGE_LAYOUT_PRESENT_SRC_KHRIMAGE_LAYOUT_SHARED_PRESENT_KHR- VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR, VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, and VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR without the unifiedImageLayoutsVideo feature
- VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR, and VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR without the unifiedImageLayoutsVideo feature
- VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR without the unifiedImageLayoutsVideo feature
While IMAGE_LAYOUT_GENERAL suggests that all types of device access is
possible, it does not mean that all patterns of memory accesses are safe
in all situations.
Common Render Pass Data Races
outlines some situations where data races are unavoidable. For example,
when a subresource is used as both an attachment and a sampled image
(i.e., not an input attachment),
enabling feedback loop
adds extra guarantees which IMAGE_LAYOUT_GENERAL alone does not.
See Also
VK_VERSION_1_0,
AttachmentDescription,
AttachmentDescription2,
AttachmentDescriptionStencilLayout,
AttachmentReference,
AttachmentReference2,
AttachmentReferenceStencilLayout,
BlitImageInfo2,
CopyBufferToImageInfo2,
CopyImageInfo2,
CopyImageToBufferInfo2,
PromotedStreamingTransfers.CopyImageToImageInfo',
PromotedStreamingTransfers.CopyImageToMemoryInfo',
CopyMemoryToImageIndirectInfoKHR,
PromotedStreamingTransfers.CopyMemoryToImageInfo',
DescriptorImageInfo,
PromotedStreamingTransfers.HostImageLayoutTransitionInfo',
ImageCreateInfo,
ImageDescriptorInfoEXT,
ImageMemoryBarrier,
ImageMemoryBarrier2,
PromotedStreamingTransfers.PhysicalDeviceHostImageCopyProperties',
PhysicalDeviceVulkan14Properties,
RenderingAttachmentInfo,
RenderingFragmentDensityMapAttachmentInfoEXT,
RenderingFragmentShadingRateAttachmentInfoKHR,
ResolveImageInfo2,
bindOpticalFlowSessionImageNV,
cmdBindInvocationMaskHUAWEI,
cmdBindShadingRateImageNV,
cmdBlitImage,
cmdClearColorImage,
cmdClearDepthStencilImage,
cmdCopyBufferToImage,
cmdCopyImage,
cmdCopyImageToBuffer,
cmdCopyMemoryToImageIndirectNV,
cmdResolveImage
Constructors
| ImageLayout Int32 |
Bundled Patterns