| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Image
Synopsis
- createImage :: forall a io. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Image
- withImage :: forall a io r. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> (io Image -> (Image -> io ()) -> r) -> r
- destroyImage :: forall io. MonadIO io => Device -> Image -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getImageSubresourceLayout :: forall io. 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_UNDEFINED :: ImageLayout
- pattern IMAGE_LAYOUT_GENERAL :: ImageLayout
- pattern IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_PREINITIALIZED :: ImageLayout
- pattern IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT :: ImageLayout
- pattern IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR :: ImageLayout
- pattern IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT :: ImageLayout
- pattern IMAGE_LAYOUT_SHARED_PRESENT_KHR :: ImageLayout
- pattern IMAGE_LAYOUT_PRESENT_SRC_KHR :: ImageLayout
- pattern IMAGE_LAYOUT_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout
- pattern IMAGE_LAYOUT_DEPTH_READ_ONLY_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_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout
Documentation
Arguments
| :: forall a io. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> ImageCreateInfo a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io Image |
vkCreateImage - Create a new image object
Valid Usage
- 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
Return Codes
See Also
VK_VERSION_1_0,
AllocationCallbacks,
Device, Image,
ImageCreateInfo
withImage :: forall a 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
| :: forall io. 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
| :: forall io. 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 inImageCreateInfowhenimagewas created - The
arrayLayermember ofpSubresourcemust be less than thearrayLayersspecified inImageCreateInfowhenimagewas created - If
formatof theimageis a color format,tilingof theimageisIMAGE_TILING_LINEARorIMAGE_TILING_OPTIMAL, and does not have a multi-planar image format, 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 image 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 theycbcrImageArraysfeature is enabled, or otherwise indicated byImageFormatProperties::maxArrayLayers, as returned bygetPhysicalDeviceImageFormatPropertiessamplesisSAMPLE_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
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
PhysicalDeviceHostImageCopyPropertiesEXT::identicalMemoryTypeRequirements,
usage of
IMAGE_USAGE_HOST_TRANSFER_BIT_EXT
must not affect the memory type requirements of the image as described
in
Sparse Resource Memory Requirements
and
Resource Memory Association.
Note
For images created without
IMAGE_CREATE_EXTENDED_USAGE_BIT
a usage bit is valid if it is supported for the format the image is
created with.
For images created with
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 bits also set in VkVideoFormatPropertiesKHR::imageCreateFlags.ImageCreateInfo::imageTypeequals VkVideoFormatPropertiesKHR::imageType.ImageCreateInfo::tilingequals VkVideoFormatPropertiesKHR::imageTiling.ImageCreateInfo::usageonly contains bits also set in VkVideoFormatPropertiesKHR::imageUsageFlags.
- 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
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 -
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 bit value 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::externalMemoryProperties.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_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,widthmust be a multiple of 2 - If
formathas a_420suffix,heightmust be a multiple 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_SAMPLED_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 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
flagsdoes not containIMAGE_CREATE_MUTABLE_FORMAT_BITand thepNextchain includes aImageFormatListCreateInfostructure, thenImageFormatListCreateInfo::viewFormatCountmust be0or1 - If
usageincludesVK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR,VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, orVK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then thepNextchain must include a VkVideoProfileListInfoKHR structure withprofileCountgreater than0andpProfilesincluding at least one VkVideoProfileInfoKHR structure with avideoCodecOperationmember specifying a decode operation - If
usageincludesVK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR,VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR, orVK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then thepNextchain must include a VkVideoProfileListInfoKHR structure withprofileCountgreater than0andpProfilesincluding at least one VkVideoProfileInfoKHR structure with avideoCodecOperationmember specifying an encode operation - If the
pNextchain includes a VkVideoProfileListInfoKHR structure withprofileCountgreater than0, thensupportedVideoFormatmust beTRUE - 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_BUFFER_CAPTURE_REPLAY_BIT_EXT, the descriptorBufferCaptureReplay 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_EXT, thenusagemust not containIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
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,ExternalFormatQNX,ExternalMemoryImageCreateInfo,ExternalMemoryImageCreateInfoNV,ImageCompressionControlEXT,ImageDrmFormatModifierExplicitCreateInfoEXT,ImageDrmFormatModifierListCreateInfoEXT,ImageFormatListCreateInfo,ImageStencilUsageCreateInfo,ImageSwapchainCreateInfoKHR,ImportMetalIOSurfaceInfoEXT,ImportMetalTextureInfoEXT,OpaqueCaptureDescriptorDataCreateInfoEXT,OpticalFlowImageFormatInfoNV, or VkVideoProfileListInfoKHR - The
sTypevalue of each struct 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,
DeviceImageSubresourceInfoKHR,
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,
SubresourceLayout2KHR,
getImageSubresourceLayout
Constructors
| SubresourceLayout | |
Fields
| |
Instances
VkImage - Opaque handle to an image object
See Also
VK_VERSION_1_0,
BindImageMemoryInfo,
BlitImageInfo2,
CopyBufferToImageInfo2,
CopyImageInfo2,
CopyImageToBufferInfo2,
CopyImageToImageInfoEXT,
CopyImageToMemoryInfoEXT,
CopyMemoryToImageInfoEXT,
DedicatedAllocationMemoryAllocateInfoNV,
ExportMetalIOSurfaceInfoEXT,
ExportMetalTextureInfoEXT,
FrameBoundaryEXT,
HostImageLayoutTransitionInfoEXT,
ImageCaptureDescriptorDataInfoEXT,
ImageMemoryBarrier,
ImageMemoryBarrier2,
ImageMemoryRequirementsInfo2,
ImageSparseMemoryRequirementsInfo2,
ImageViewCreateInfo,
MemoryDedicatedAllocateInfo,
ResolveImageInfo2,
SparseImageMemoryBindInfo,
SparseImageOpaqueMemoryBindInfo,
bindImageMemory,
cmdBlitImage,
cmdClearColorImage,
cmdClearDepthStencilImage,
cmdCopyBufferToImage,
cmdCopyImage,
cmdCopyImageToBuffer,
cmdCopyMemoryToImageIndirectNV,
cmdResolveImage,
createImage, destroyImage,
getImageDrmFormatModifierPropertiesEXT,
getImageMemoryRequirements,
getImageSparseMemoryRequirements,
getImageSubresourceLayout,
getImageSubresourceLayout2EXT,
getImageSubresourceLayout2KHR,
getSwapchainImagesKHR
Instances
| Storable Image Source # | |
| Show Image Source # | |
| Eq Image Source # | |
| Ord 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:
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/1.3-extensions/html/vkspec.html#clears
and
https://registry.khronos.org/vulkan/specs/1.3-extensions/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/1.3-extensions/html/vkspec.html#descriptorsets-updates).
See Also
VK_VERSION_1_0,
AttachmentDescription,
AttachmentDescription2,
AttachmentDescriptionStencilLayout,
AttachmentReference,
AttachmentReference2,
AttachmentReferenceStencilLayout,
BlitImageInfo2,
CopyBufferToImageInfo2,
CopyImageInfo2,
CopyImageToBufferInfo2,
CopyImageToImageInfoEXT,
CopyImageToMemoryInfoEXT,
CopyMemoryToImageInfoEXT,
DescriptorImageInfo,
HostImageLayoutTransitionInfoEXT,
ImageCreateInfo,
ImageMemoryBarrier,
ImageMemoryBarrier2,
PhysicalDeviceHostImageCopyPropertiesEXT,
RenderingAttachmentInfo,
RenderingFragmentDensityMapAttachmentInfoEXT,
RenderingFragmentShadingRateAttachmentInfoKHR,
ResolveImageInfo2,
bindOpticalFlowSessionImageNV,
cmdBindInvocationMaskHUAWEI,
cmdBindShadingRateImageNV,
cmdBlitImage,
cmdClearColorImage,
cmdClearDepthStencilImage,
cmdCopyBufferToImage,
cmdCopyImage,
cmdCopyImageToBuffer,
cmdCopyMemoryToImageIndirectNV,
cmdResolveImage
Constructors
| ImageLayout Int32 |
Bundled Patterns
| pattern IMAGE_LAYOUT_UNDEFINED :: ImageLayout |
|
| pattern IMAGE_LAYOUT_GENERAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_PREINITIALIZED :: ImageLayout |
|
| pattern IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT :: ImageLayout |
|
| pattern IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR :: ImageLayout |
|
| pattern IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT :: ImageLayout |
|
| pattern IMAGE_LAYOUT_SHARED_PRESENT_KHR :: ImageLayout |
|
| pattern IMAGE_LAYOUT_PRESENT_SRC_KHR :: ImageLayout |
|
| pattern IMAGE_LAYOUT_ATTACHMENT_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_READ_ONLY_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout |
|
| pattern IMAGE_LAYOUT_DEPTH_READ_ONLY_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_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout |
|