vulkan-3.6.11.1: Bindings to the Vulkan graphics API.

Vulkan.Core10.Image

Synopsis

# Documentation

Arguments

 :: forall a io. (Extendss ImageCreateInfo a, PokeChain a, MonadIO io) => Device device is the logical device that creates the image. -> ImageCreateInfo a pCreateInfo is a pointer to a ImageCreateInfo structure containing parameters to be used to create the image. -> ("allocator" ::: Maybe AllocationCallbacks) pAllocator controls host memory allocation as described in the Memory Allocation chapter. -> io Image

vkCreateImage - Create a new image object

## Valid Usage

• If the flags member of pCreateInfo includes IMAGE_CREATE_SPARSE_BINDING_BIT, creating this Image must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed PhysicalDeviceLimits::sparseAddressSpaceSize

## Valid Usage (Implicit)

• device must be a valid Device handle
• pCreateInfo must be a valid pointer to a valid ImageCreateInfo structure
• If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure
• pImage must be a valid pointer to a Image handle

## Return Codes

Success
• SUCCESS
Failure
• ERROR_OUT_OF_HOST_MEMORY
• ERROR_OUT_OF_DEVICE_MEMORY

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 first argument. To just extract the pair pass (,) as the first argument.

Arguments

 :: forall io. MonadIO io => Device device is the logical device that destroys the image. -> Image image is the image to destroy. -> ("allocator" ::: Maybe AllocationCallbacks) pAllocator controls host memory allocation as described in the Memory Allocation chapter. -> io ()

vkDestroyImage - Destroy an image object

## Valid Usage

• All submitted commands that refer to image, either directly or via a ImageView, must have completed execution
• If AllocationCallbacks were provided when image was created, a compatible set of callbacks must be provided here
• If no AllocationCallbacks were provided when image was created, pAllocator must be NULL

## Valid Usage (Implicit)

• device must be a valid Device handle
• If image is not NULL_HANDLE, image must be a valid Image handle
• If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure
• If image is a valid handle, it must have been created, allocated, or retrieved from device

## Host Synchronization

• Host access to image must be externally synchronized

AllocationCallbacks, Device, Image

Arguments

 :: forall io. MonadIO io => Device device is the logical device that owns the image. -> Image image is the image whose layout is being queried. -> ImageSubresource pSubresource is a pointer to a ImageSubresource structure selecting a specific image for the image subresource. -> 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 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

• image must have been created with tiling equal to IMAGE_TILING_LINEAR or IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
• The aspectMask member of pSubresource must only have a single bit set
• The mipLevel member of pSubresource must be less than the mipLevels specified in ImageCreateInfo when image was created
• The arrayLayer member of pSubresource must be less than the arrayLayers specified in ImageCreateInfo when image was created
• If format is a color format, the aspectMask member of pSubresource must be IMAGE_ASPECT_COLOR_BIT
• If format has a depth component, the aspectMask member of pSubresource must contain IMAGE_ASPECT_DEPTH_BIT
• If format has a stencil component, the aspectMask member of pSubresource must contain IMAGE_ASPECT_STENCIL_BIT
• If format does not contain a stencil or depth component, the aspectMask member of pSubresource must not contain IMAGE_ASPECT_DEPTH_BIT or IMAGE_ASPECT_STENCIL_BIT
• If the tiling of the image is IMAGE_TILING_LINEAR and its format is a multi-planar format with two planes, the aspectMask member of pSubresource must be IMAGE_ASPECT_PLANE_0_BIT or IMAGE_ASPECT_PLANE_1_BIT
• If the tiling of the image is IMAGE_TILING_LINEAR and its format is a multi-planar format with three planes, the aspectMask member of pSubresource must be IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT or IMAGE_ASPECT_PLANE_2_BIT
• If image was created with the EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID external memory handle type, then image must be bound to memory
• If the tiling of the image is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT and the index i must be less than the DrmFormatModifierPropertiesEXT::drmFormatModifierPlaneCount associated with the image’s format and ImageDrmFormatModifierPropertiesEXT::drmFormatModifier

## Valid Usage (Implicit)

• device must be a valid Device handle
• image must be a valid Image handle
• pSubresource must be a valid pointer to a valid ImageSubresource structure
• pLayout must be a valid pointer to a SubresourceLayout structure
• image must have been created, allocated, or retrieved from device

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:

• imageType is IMAGE_TYPE_2D
• format is not a depth/stencil format
• mipLevels is 1
• arrayLayers is 1
• samples is SAMPLE_COUNT_1_BIT
• usage only includes IMAGE_USAGE_TRANSFER_SRC_BIT and/or IMAGE_USAGE_TRANSFER_DST_BIT

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

• imageType is IMAGE_TYPE_2D
• mipLevels is 1
• arrayLayers is 1
• samples is SAMPLE_COUNT_1_BIT

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

To determine the set of valid usage bits for a given format, call 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.

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).

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 tiling is not IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then imageCreateDrmFormatModifiers is empty.
• If ImageCreateInfo::pNext contains ImageDrmFormatModifierExplicitCreateInfoEXT, then imageCreateDrmFormatModifiers contains exactly one modifier, ImageDrmFormatModifierExplicitCreateInfoEXT::drmFormatModifier.
• If ImageCreateInfo::pNext contains ImageDrmFormatModifierListCreateInfoEXT, then imageCreateDrmFormatModifiers contains the entire array ImageDrmFormatModifierListCreateInfoEXT::pDrmFormatModifiers.
• Let VkBool32 imageCreateMaybeLinear indicate if the resultant image may be linear.

• If tiling is IMAGE_TILING_LINEAR, then imageCreateMaybeLinear is true.
• If tiling is IMAGE_TILING_OPTIMAL, then imageCreateMaybeLinear is false.
• If tiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then imageCreateMaybeLinear_ is true if and only if imageCreateDrmFormatModifiers contains DRM_FORMAT_MOD_LINEAR.
• Let VkFormatFeatureFlags imageCreateFormatFeatures be the set of valid format features available during image creation.

• If tiling is IMAGE_TILING_LINEAR, then imageCreateFormatFeatures is the value of FormatProperties::linearTilingFeatures found by calling getPhysicalDeviceFormatProperties with parameter format equal to ImageCreateInfo::format.
• If tiling is IMAGE_TILING_OPTIMAL, and if the pNext chain includes no ExternalFormatANDROID structure with non-zero externalFormat, then imageCreateFormatFeatures is value of FormatProperties::optimalTilingFeatures found by calling getPhysicalDeviceFormatProperties with parameter format equal to ImageCreateInfo::format.
• If tiling is IMAGE_TILING_OPTIMAL, and if the pNext chain includes a ExternalFormatANDROID structure with non-zero externalFormat, then imageCreateFormatFeatures is the value of AndroidHardwareBufferFormatPropertiesANDROID::formatFeatures obtained by getAndroidHardwareBufferPropertiesANDROID with a matching externalFormat value.
• If tiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the value of imageCreateFormatFeatures is found by calling getPhysicalDeviceFormatProperties2 with ImageFormatProperties::format equal to ImageCreateInfo::format and with DrmFormatModifierPropertiesListEXT chained into ImageFormatProperties2; by collecting all members of the returned array DrmFormatModifierPropertiesListEXT::pDrmFormatModifierProperties whose drmFormatModifier belongs to imageCreateDrmFormatModifiers; and by taking the bitwise intersection, over the collected array members, of drmFormatModifierTilingFeatures. (The resultant imageCreateFormatFeatures may be empty).
• Let VkImageFormatProperties2 imageCreateImageFormatPropertiesList[] be defined as follows.

• If ImageCreateInfo::pNext contains no ExternalFormatANDROID structure with non-zero externalFormat, then imageCreateImageFormatPropertiesList is the list of structures obtained by calling getPhysicalDeviceImageFormatProperties2, possibly multiple times, as follows:

• The parameters PhysicalDeviceImageFormatInfo2::format, imageType, tiling, usage, and flags must be equal to those in ImageCreateInfo.
• If ImageCreateInfo::pNext contains a ExternalMemoryImageCreateInfo structure whose handleTypes is not 0, then PhysicalDeviceImageFormatInfo2::pNext must contain a PhysicalDeviceExternalImageFormatInfo structure whose handleType is not 0; and getPhysicalDeviceImageFormatProperties2 must be called for each handle type in ExternalMemoryImageCreateInfo::handleTypes, successively setting PhysicalDeviceExternalImageFormatInfo::handleType on each call.
• If ImageCreateInfo::pNext contains no ExternalMemoryImageCreateInfo structure, or contains a structure whose handleTypes is 0, then PhysicalDeviceImageFormatInfo2::pNext must either contain no PhysicalDeviceExternalImageFormatInfo structure, or contain a structure whose handleType is 0.
• If tiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then PhysicalDeviceImageFormatInfo2::pNext must contain a PhysicalDeviceImageDrmFormatModifierInfoEXT structure where sharingMode is equal to ImageCreateInfo::sharingMode; and, if sharingMode is SHARING_MODE_CONCURRENT, then queueFamilyIndexCount and pQueueFamilyIndices must be equal to those in ImageCreateInfo; and, if flags contains IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the ImageFormatListCreateInfo structure included in the pNext chain of PhysicalDeviceImageFormatInfo2 must be equivalent to the one included in the pNext chain of ImageCreateInfo; and getPhysicalDeviceImageFormatProperties2 must be called for each modifier in imageCreateDrmFormatModifiers, successively setting PhysicalDeviceImageDrmFormatModifierInfoEXT::drmFormatModifier on each call.
• If tiling is not IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then PhysicalDeviceImageFormatInfo2::pNext must contain no PhysicalDeviceImageDrmFormatModifierInfoEXT structure.
• If any call to getPhysicalDeviceImageFormatProperties2 returns an error, then imageCreateImageFormatPropertiesList is defined to be the empty list.
• If ImageCreateInfo::pNext contains a ExternalFormatANDROID structure with non-zero externalFormat, then imageCreateImageFormatPropertiesList contains a single element where:

• ImageFormatProperties::maxMipLevels is ⌊log2(max(extent.width, extent.height, extent.depth))⌋ + 1.
• ImageFormatProperties::maxArrayLayers is PhysicalDeviceLimits::maxImageArrayLayers.
• Each component of ImageFormatProperties::maxExtent is PhysicalDeviceLimits::maxImageDimension2D.
• ImageFormatProperties::sampleCounts contains exactly SAMPLE_COUNT_1_BIT.
• Let uint32_t imageCreateMaxMipLevels be the minimum value of ImageFormatProperties::maxMipLevels in imageCreateImageFormatPropertiesList. The value is undefined if imageCreateImageFormatPropertiesList is empty.
• Let uint32_t imageCreateMaxArrayLayers be the minimum value of ImageFormatProperties::maxArrayLayers in imageCreateImageFormatPropertiesList. The value is undefined if imageCreateImageFormatPropertiesList is empty.
• Let VkExtent3D imageCreateMaxExtent be the component-wise minimum over all ImageFormatProperties::maxExtent values in imageCreateImageFormatPropertiesList. The value is undefined if imageCreateImageFormatPropertiesList is empty.
• Let VkSampleCountFlags imageCreateSampleCounts be the intersection of each ImageFormatProperties::sampleCounts in imageCreateImageFormatPropertiesList. The value is undefined if imageCreateImageFormatPropertiesList is empty.

# Valid Usage

• Each of the following values (as described in Image Creation Limits) must not be undefined imageCreateMaxMipLevels, imageCreateMaxArrayLayers, imageCreateMaxExtent, and imageCreateSampleCounts
• If sharingMode is SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values
• If sharingMode is SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1
• If sharingMode is SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either getPhysicalDeviceQueueFamilyProperties or getPhysicalDeviceQueueFamilyProperties2 for the physicalDevice that was used to create device
• If the pNext chain includes a ExternalFormatANDROID structure, and its externalFormat member is non-zero the format must be FORMAT_UNDEFINED
• If the pNext chain does not include a ExternalFormatANDROID structure, or does and its externalFormat member is 0, the format must not be FORMAT_UNDEFINED
• extent.width must be greater than 0
• extent.height must be greater than 0
• extent.depth must be greater than 0
• mipLevels must be greater than 0
• arrayLayers must be greater than 0
• If flags contains IMAGE_CREATE_CUBE_COMPATIBLE_BIT, imageType must be IMAGE_TYPE_2D
• If flags contains IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, imageType must be IMAGE_TYPE_2D
• If flags contains IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, imageType must be IMAGE_TYPE_3D
• extent.width must be less than or equal to imageCreateMaxExtent.width (as defined in Image Creation Limits)
• extent.height must be less than or equal to imageCreateMaxExtent.height (as defined in Image Creation Limits)
• extent.depth must be less than or equal to imageCreateMaxExtent.depth (as defined in Image Creation Limits)
• If imageType is IMAGE_TYPE_2D and flags contains IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be equal and arrayLayers must be greater than or equal to 6
• If imageType is IMAGE_TYPE_1D, both extent.height and extent.depth must be 1
• If imageType is IMAGE_TYPE_2D, extent.depth must be 1
• mipLevels must be less than or equal to the number of levels in the complete mipmap chain based on extent.width, extent.height, and extent.depth
• mipLevels must be less than or equal to imageCreateMaxMipLevels (as defined in Image Creation Limits)
• arrayLayers must be less than or equal to imageCreateMaxArrayLayers (as defined in Image Creation Limits)
• If imageType is IMAGE_TYPE_3D, arrayLayers must be 1
• If samples is not SAMPLE_COUNT_1_BIT, then imageType must be IMAGE_TYPE_2D, flags must not contain IMAGE_CREATE_CUBE_COMPATIBLE_BIT, mipLevels must be equal to 1, and imageCreateMaybeLinear (as defined in Image Creation Limits) must be false,
• If samples is not SAMPLE_COUNT_1_BIT, usage must not contain IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
• If usage includes IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than IMAGE_USAGE_COLOR_ATTACHMENT_BIT, IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set
• If usage includes IMAGE_USAGE_COLOR_ATTACHMENT_BIT, IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to PhysicalDeviceLimits::maxFramebufferWidth
• If usage includes IMAGE_USAGE_COLOR_ATTACHMENT_BIT, IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to PhysicalDeviceLimits::maxFramebufferHeight
• If usage includes IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, extent.width must be less than or equal to $$\left\lceil{\frac{maxFramebufferWidth}{minFragmentDensityTexelSize_{width}}}\right\rceil$$
• If usage includes IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, extent.height must be less than or equal to $$\left\lceil{\frac{maxFramebufferHeight}{minFragmentDensityTexelSize_{height}}}\right\rceil$$
• If usage includes IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, usage must also contain at least one of IMAGE_USAGE_COLOR_ATTACHMENT_BIT, IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or IMAGE_USAGE_INPUT_ATTACHMENT_BIT
• samples must be a bit value that is set in imageCreateSampleCounts (as defined in Image Creation Limits)
• If the multisampled storage images feature is not enabled, and usage contains IMAGE_USAGE_STORAGE_BIT, samples must be SAMPLE_COUNT_1_BIT
• If the sparse bindings feature is not enabled, flags must not contain IMAGE_CREATE_SPARSE_BINDING_BIT
• If the sparse aliased residency feature is not enabled, flags must not contain IMAGE_CREATE_SPARSE_ALIASED_BIT
• If tiling is IMAGE_TILING_LINEAR, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If imageType is IMAGE_TYPE_1D, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If the sparse residency for 2D images feature is not enabled, and imageType is IMAGE_TYPE_2D, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If the sparse residency for 3D images feature is not enabled, and imageType is IMAGE_TYPE_3D, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If the sparse residency for images with 2 samples feature is not enabled, imageType is IMAGE_TYPE_2D, and samples is SAMPLE_COUNT_2_BIT, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If the sparse residency for images with 4 samples feature is not enabled, imageType is IMAGE_TYPE_2D, and samples is SAMPLE_COUNT_4_BIT, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If the sparse residency for images with 8 samples feature is not enabled, imageType is IMAGE_TYPE_2D, and samples is SAMPLE_COUNT_8_BIT, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If the sparse residency for images with 16 samples feature is not enabled, imageType is IMAGE_TYPE_2D, and samples is SAMPLE_COUNT_16_BIT, flags must not contain IMAGE_CREATE_SPARSE_RESIDENCY_BIT
• If flags contains IMAGE_CREATE_SPARSE_RESIDENCY_BIT or IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain IMAGE_CREATE_SPARSE_BINDING_BIT
• If any of the bits IMAGE_CREATE_SPARSE_BINDING_BIT, IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or IMAGE_CREATE_SPARSE_ALIASED_BIT are set, IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT must not also be set
• If the protected memory feature is not enabled, flags must not contain IMAGE_CREATE_PROTECTED_BIT
• If any of the bits IMAGE_CREATE_SPARSE_BINDING_BIT, IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or IMAGE_CREATE_SPARSE_ALIASED_BIT are set, IMAGE_CREATE_PROTECTED_BIT must not also be set
• If the pNext chain includes a ExternalMemoryImageCreateInfoNV structure, it must not contain a ExternalMemoryImageCreateInfo structure
• If the pNext chain includes a ExternalMemoryImageCreateInfo structure, its handleTypes member must only contain bits that are also in ExternalImageFormatProperties::externalMemoryProperties.compatibleHandleTypes, as returned by getPhysicalDeviceImageFormatProperties2 with format, imageType, tiling, usage, and flags equal to those in this structure, and with a PhysicalDeviceExternalImageFormatInfo structure included in the pNext chain, with a handleType equal to any one of the handle types specified in ExternalMemoryImageCreateInfo::handleTypes
• If the pNext chain includes a ExternalMemoryImageCreateInfoNV structure, its handleTypes member must only contain bits that are also in ExternalImageFormatPropertiesNV::externalMemoryProperties.compatibleHandleTypes, as returned by getPhysicalDeviceExternalImageFormatPropertiesNV with format, imageType, tiling, usage, and flags equal to those in this structure, and with externalHandleType equal to any one of the handle types specified in ExternalMemoryImageCreateInfoNV::handleTypes
• If the logical device was created with DeviceGroupDeviceCreateInfo::physicalDeviceCount equal to 1, flags must not contain IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
• If flags contains IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, then mipLevels must be one, arrayLayers must be one, imageType must be IMAGE_TYPE_2D. and imageCreateMaybeLinear (as defined in Image Creation Limits) must be false
• If flags contains IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, then format must be a block-compressed image format, an ETC compressed image format, or an ASTC compressed image format
• If flags contains IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, then flags must also contain IMAGE_CREATE_MUTABLE_FORMAT_BIT
• initialLayout must be IMAGE_LAYOUT_UNDEFINED or IMAGE_LAYOUT_PREINITIALIZED
• If the pNext chain includes a ExternalMemoryImageCreateInfo or ExternalMemoryImageCreateInfoNV structure whose handleTypes member is not 0, initialLayout must be IMAGE_LAYOUT_UNDEFINED
• If the image format is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, then mipLevels must be 1
• If the image format is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, samples must be SAMPLE_COUNT_1_BIT
• If the image format is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, imageType must be IMAGE_TYPE_2D
• If the image format is one of those listed in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion, and the ycbcrImageArrays feature is not enabled, arrayLayers must be 1
• If format is a multi-planar format, and if imageCreateFormatFeatures (as defined in Image Creation Limits) does not contain FORMAT_FEATURE_DISJOINT_BIT, then flags must not contain IMAGE_CREATE_DISJOINT_BIT
• If format is not a multi-planar format, and flags does not include IMAGE_CREATE_ALIAS_BIT, flags must not contain IMAGE_CREATE_DISJOINT_BIT
• If tiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the pNext chain must include exactly one of ImageDrmFormatModifierListCreateInfoEXT or ImageDrmFormatModifierExplicitCreateInfoEXT structures
• If the pNext chain includes a ImageDrmFormatModifierListCreateInfoEXT or ImageDrmFormatModifierExplicitCreateInfoEXT structure, then tiling must be IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
• If tiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and flags contains IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the pNext chain must include a ImageFormatListCreateInfo structure with non-zero viewFormatCount
• If flags contains IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT format must be a depth or depth/stencil format
• If the pNext chain includes a ExternalMemoryImageCreateInfo structure whose handleTypes member includes EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, imageType must be IMAGE_TYPE_2D
• If the pNext chain includes a ExternalMemoryImageCreateInfo structure whose handleTypes member includes EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, mipLevels must either be 1 or equal to the number of levels in the complete mipmap chain based on extent.width, extent.height, and extent.depth
• If the pNext chain includes a ExternalFormatANDROID structure whose externalFormat member is not 0, flags must not include IMAGE_CREATE_MUTABLE_FORMAT_BIT
• If the pNext chain includes a ExternalFormatANDROID structure whose externalFormat member is not 0, usage must not include any usages except IMAGE_USAGE_SAMPLED_BIT
• If the pNext chain includes a ExternalFormatANDROID structure whose externalFormat member is not 0, tiling must be IMAGE_TILING_OPTIMAL
• If format is a depth-stencil format, usage includes IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and the pNext chain includes a ImageStencilUsageCreateInfo structure, then its ImageStencilUsageCreateInfo::stencilUsage member must also include IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
• If format is a depth-stencil format, usage does not include IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and the pNext chain includes a ImageStencilUsageCreateInfo structure, then its ImageStencilUsageCreateInfo::stencilUsage member must also not include IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
• If format is a depth-stencil format, usage includes IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and the pNext chain includes a ImageStencilUsageCreateInfo structure, then its ImageStencilUsageCreateInfo::stencilUsage member must also include IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
• If format is a depth-stencil format, usage does not include IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and the pNext chain includes a ImageStencilUsageCreateInfo structure, then its ImageStencilUsageCreateInfo::stencilUsage member must also not include IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
• If Format is a depth-stencil format and the pNext chain includes a ImageStencilUsageCreateInfo structure with its stencilUsage member including IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to PhysicalDeviceLimits::maxFramebufferWidth
• If format is a depth-stencil format and the pNext chain includes a ImageStencilUsageCreateInfo structure with its stencilUsage member including IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to PhysicalDeviceLimits::maxFramebufferHeight
• If the multisampled storage images feature is not enabled, format is a depth-stencil format and the pNext chain includes a ImageStencilUsageCreateInfo structure with its stencilUsage including IMAGE_USAGE_STORAGE_BIT, samples must be SAMPLE_COUNT_1_BIT
• If flags contains IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, imageType must be IMAGE_TYPE_2D or IMAGE_TYPE_3D
• If flags contains IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, it must not contain IMAGE_CREATE_CUBE_COMPATIBLE_BIT and the format must not be a depth/stencil format
• If flags contains IMAGE_CREATE_CORNER_SAMPLED_BIT_NV and imageType is IMAGE_TYPE_2D, extent.width and extent.height must be greater than 1
• If flags contains IMAGE_CREATE_CORNER_SAMPLED_BIT_NV and imageType is IMAGE_TYPE_3D, extent.width, extent.height, and extent.depth must be greater than 1
• If usage includes IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, imageType must be IMAGE_TYPE_2D
• If usage includes IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, samples must be SAMPLE_COUNT_1_BIT
• If usage includes IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV, tiling must be IMAGE_TILING_OPTIMAL
• If flags contains IMAGE_CREATE_SUBSAMPLED_BIT_EXT, tiling must be IMAGE_TILING_OPTIMAL
• If flags contains IMAGE_CREATE_SUBSAMPLED_BIT_EXT, imageType must be IMAGE_TYPE_2D
• If flags contains IMAGE_CREATE_SUBSAMPLED_BIT_EXT, flags must not contain IMAGE_CREATE_CUBE_COMPATIBLE_BIT
• If flags contains IMAGE_CREATE_SUBSAMPLED_BIT_EXT, mipLevels must be 1
• If the VK_KHR_portability_subset extension is enabled, and PhysicalDevicePortabilitySubsetFeaturesKHR::imageView2DOn3DImage is FALSE, flags must not contain IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT.
• If the VK_KHR_portability_subset extension is enabled, and PhysicalDevicePortabilitySubsetFeaturesKHR::multisampleArrayImage is FALSE, and samples is not SAMPLE_COUNT_1_BIT, then arrayLayers must be 1.

# Valid Usage (Implicit)

• sType must be STRUCTURE_TYPE_IMAGE_CREATE_INFO
• Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of DedicatedAllocationImageCreateInfoNV, ExternalFormatANDROID, ExternalMemoryImageCreateInfo, ExternalMemoryImageCreateInfoNV, ImageDrmFormatModifierExplicitCreateInfoEXT, ImageDrmFormatModifierListCreateInfoEXT, ImageFormatListCreateInfo, ImageStencilUsageCreateInfo, or ImageSwapchainCreateInfoKHR
• The sType value of each struct in the pNext chain must be unique
• flags must be a valid combination of ImageCreateFlagBits values
• imageType must be a valid ImageType value
• format must be a valid Format value
• samples must be a valid SampleCountFlagBits value
• tiling must be a valid ImageTiling value
• usage must be a valid combination of ImageUsageFlagBits values
• usage must not be 0
• sharingMode must be a valid SharingMode value
• initialLayout must be a valid ImageLayout value

Extent3D, Format, ImageCreateFlags, ImageLayout, ImageTiling, ImageType, ImageUsageFlags, SampleCountFlagBits, SharingMode, StructureType, createImage

Constructors

 ImageCreateInfo Fieldsnext :: Chain espNext is NULL or a pointer to a structure extending this structure.flags :: ImageCreateFlagsflags is a bitmask of ImageCreateFlagBits describing additional parameters of the image.imageType :: ImageTypeimageType is a ImageType value specifying the basic dimensionality of the image. Layers in array textures do not count as a dimension for the purposes of the image type.format :: Formatformat is a Format describing the format and type of the texel blocks that will be contained in the image.extent :: Extent3Dextent is a Extent3D describing the number of data elements in each dimension of the base level.mipLevels :: Word32mipLevels describes the number of levels of detail available for minified sampling of the image.arrayLayers :: Word32arrayLayers is the number of layers in the image.samples :: SampleCountFlagBitssamples is a SampleCountFlagBits specifying the number of samples per texel.tiling :: ImageTilingtiling is a ImageTiling value specifying the tiling arrangement of the texel blocks in memory.usage :: ImageUsageFlagsusage is a bitmask of ImageUsageFlagBits describing the intended usage of the image.sharingMode :: SharingModesharingMode is a SharingMode value specifying the sharing mode of the image when it will be accessed by multiple queue families.queueFamilyIndices :: Vector Word32pQueueFamilyIndices is a list of queue families that will access this image (ignored if sharingMode is not SHARING_MODE_CONCURRENT).initialLayout :: ImageLayoutinitialLayout is a ImageLayout value specifying the initial ImageLayout of all image subresources of the image. See Image Layouts.

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Core10.Image MethodsgetNext :: forall (es :: [Type]). ImageCreateInfo es -> Chain es Source #setNext :: forall (ds :: [Type]) (es :: [Type]). ImageCreateInfo ds -> Chain es -> ImageCreateInfo es Source #extends :: forall e b proxy. Typeable e => proxy e -> (Extends ImageCreateInfo e => b) -> Maybe b Source # Show (Chain es) => Show (ImageCreateInfo es) Source # Instance detailsDefined in Vulkan.Core10.Image MethodsshowsPrec :: Int -> ImageCreateInfo es -> ShowS #show :: ImageCreateInfo es -> String #showList :: [ImageCreateInfo es] -> ShowS # Source # Instance detailsDefined in Vulkan.Core10.Image Methods (Extendss ImageCreateInfo es, PokeChain es) => ToCStruct (ImageCreateInfo es) Source # Instance detailsDefined in Vulkan.Core10.Image MethodswithCStruct :: ImageCreateInfo es -> (Ptr (ImageCreateInfo es) -> IO b) -> IO b Source #pokeCStruct :: Ptr (ImageCreateInfo es) -> ImageCreateInfo es -> IO b -> IO b Source #withZeroCStruct :: (Ptr (ImageCreateInfo es) -> IO b) -> IO b Source #pokeZeroCStruct :: Ptr (ImageCreateInfo es) -> IO b -> IO b Source # es ~ ('[] :: [Type]) => Zero (ImageCreateInfo es) Source # Instance detailsDefined in Vulkan.Core10.Image Methods

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.

DeviceSize, ImageDrmFormatModifierExplicitCreateInfoEXT, getImageSubresourceLayout

Constructors

 SubresourceLayout Fieldsoffset :: DeviceSizeoffset is the byte offset from the start of the image or the plane where the image subresource begins.size :: DeviceSizesize is the size in bytes of the image subresource. size includes any extra memory that is required based on rowPitch.rowPitch :: DeviceSizerowPitch describes the number of bytes between each row of texels in an image.arrayPitch :: DeviceSizearrayPitch describes the number of bytes between each array layer of an image.depthPitch :: DeviceSizedepthPitch describes the number of bytes between each slice of 3D image.

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Core10.Image Methods Source # Instance detailsDefined in Vulkan.Core10.Image MethodsshowList :: [SubresourceLayout] -> ShowS # Source # Instance detailsDefined in Vulkan.Core10.Image MethodspokeByteOff :: Ptr b -> Int -> SubresourceLayout -> IO () # Source # Instance detailsDefined in Vulkan.Core10.Image Methods Source # Instance detailsDefined in Vulkan.Core10.Image MethodswithZeroCStruct :: (Ptr SubresourceLayout -> IO b) -> IO b Source # Source # Instance detailsDefined in Vulkan.Core10.Image Methods

newtype Image Source #

VkImage - Opaque handle to an image object

BindImageMemoryInfo, BlitImageInfo2KHR, CopyBufferToImageInfo2KHR, CopyImageInfo2KHR, CopyImageToBufferInfo2KHR, DedicatedAllocationMemoryAllocateInfoNV, ImageMemoryBarrier, ImageMemoryRequirementsInfo2, ImageSparseMemoryRequirementsInfo2, ImageViewCreateInfo, MemoryDedicatedAllocateInfo, ResolveImageInfo2KHR, SparseImageMemoryBindInfo, SparseImageOpaqueMemoryBindInfo, bindImageMemory, cmdBlitImage, cmdClearColorImage, cmdClearDepthStencilImage, cmdCopyBufferToImage, cmdCopyImage, cmdCopyImageToBuffer, cmdResolveImage, createImage, destroyImage, getImageDrmFormatModifierPropertiesEXT, getImageMemoryRequirements, getImageSparseMemoryRequirements, getImageSubresourceLayout, getSwapchainImagesKHR

Constructors

 Image Word64

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Core10.Handles Methods(==) :: Image -> Image -> Bool #(/=) :: Image -> Image -> Bool # Source # Instance detailsDefined in Vulkan.Core10.Handles Methods(<) :: Image -> Image -> Bool #(<=) :: Image -> Image -> Bool #(>) :: Image -> Image -> Bool #(>=) :: Image -> Image -> Bool #max :: Image -> Image -> Image #min :: Image -> Image -> Image # Source # Instance detailsDefined in Vulkan.Core10.Handles MethodsshowsPrec :: Int -> Image -> ShowS #show :: Image -> String #showList :: [Image] -> ShowS # Source # Instance detailsDefined in Vulkan.Core10.Handles MethodssizeOf :: Image -> Int #pokeElemOff :: Ptr Image -> Int -> Image -> IO () #peekByteOff :: Ptr b -> Int -> IO Image #pokeByteOff :: Ptr b -> Int -> Image -> IO () #poke :: Ptr Image -> Image -> IO () # Source # Instance detailsDefined in Vulkan.Core10.Handles Methods Source # Instance detailsDefined in Vulkan.Core10.Handles Methods Source # Instance detailsDefined 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://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears and https://www.khronos.org/registry/vulkan/specs/1.2-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://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-updates).

AttachmentDescription, AttachmentDescription2, AttachmentDescriptionStencilLayout, AttachmentReference, AttachmentReference2, AttachmentReferenceStencilLayout, BlitImageInfo2KHR, CopyBufferToImageInfo2KHR, CopyImageInfo2KHR, CopyImageToBufferInfo2KHR, DescriptorImageInfo, ImageCreateInfo, ImageMemoryBarrier, ResolveImageInfo2KHR, cmdBindShadingRateImageNV, cmdBlitImage, cmdClearColorImage, cmdClearDepthStencilImage, cmdCopyBufferToImage, cmdCopyImage, cmdCopyImageToBuffer, cmdResolveImage

Constructors

 ImageLayout Int32

Bundled Patterns

 pattern IMAGE_LAYOUT_UNDEFINED :: ImageLayout IMAGE_LAYOUT_UNDEFINED does not support device access. This layout must only be used as the initialLayout member of ImageCreateInfo or AttachmentDescription, or as the oldLayout in an image transition. When transitioning out of this layout, the contents of the memory are not guaranteed to be preserved. pattern IMAGE_LAYOUT_GENERAL :: ImageLayout IMAGE_LAYOUT_GENERAL supports all types of device access. pattern IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL :: ImageLayout IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL must only be used as a color or resolve attachment in a Framebuffer. This layout is valid only for image subresources of images created with the IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage bit enabled. pattern IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL specifies 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 to IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL and IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL. pattern IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL specifies 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 to IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL. pattern IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL :: ImageLayout IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL specifies 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 the IMAGE_USAGE_SAMPLED_BIT or IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage bit enabled. pattern IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL :: ImageLayout IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL must only be used as a source image of a transfer command (see the definition of https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-transfer). This layout is valid only for image subresources of images created with the IMAGE_USAGE_TRANSFER_SRC_BIT usage bit enabled. pattern IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL :: ImageLayout IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL must only be used as a destination image of a transfer command. This layout is valid only for image subresources of images created with the IMAGE_USAGE_TRANSFER_DST_BIT usage bit enabled. pattern IMAGE_LAYOUT_PREINITIALIZED :: ImageLayout IMAGE_LAYOUT_PREINITIALIZED does not support device access. This layout must only be used as the initialLayout member of ImageCreateInfo or AttachmentDescription, or as the oldLayout in an image transition. When transitioning out of this layout, the contents of the memory are preserved. 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_PREINITIALIZED is only useful with linear images because there is not a standard layout defined for IMAGE_TILING_OPTIMAL images. pattern IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT :: ImageLayout IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT must only be used as a fragment density map attachment in a RenderPass. This layout is valid only for image subresources of images created with the IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage bit enabled. pattern IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV :: ImageLayout pattern IMAGE_LAYOUT_SHARED_PRESENT_KHR :: ImageLayout IMAGE_LAYOUT_SHARED_PRESENT_KHR is valid only for shared presentable images, and must be used for any usage the image supports. pattern IMAGE_LAYOUT_PRESENT_SRC_KHR :: ImageLayout IMAGE_LAYOUT_PRESENT_SRC_KHR must only be used for presenting a presentable image for display. A swapchain’s image must be transitioned to this layout before calling queuePresentKHR, and must be transitioned away from this layout after calling acquireNextImageKHR. pattern IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL specifies 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. pattern IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL specifies a layout for the stencil aspect of a depth/stencil format image allowing read and write access as a stencil attachment. pattern IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL :: ImageLayout IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL specifies 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. pattern IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL :: ImageLayout IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL specifies a layout for the depth aspect of a depth/stencil format image allowing read and write access as a depth attachment. pattern IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL :: ImageLayout IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL specifies 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 to IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL and IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL. pattern IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL :: ImageLayout IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL specifies 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 to IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Core10.Enums.ImageLayout Methods Source # Instance detailsDefined in Vulkan.Core10.Enums.ImageLayout Methods Source # Instance detailsDefined in Vulkan.Core10.Enums.ImageLayout Methods Source # Instance detailsDefined in Vulkan.Core10.Enums.ImageLayout MethodsshowList :: [ImageLayout] -> ShowS # Source # Instance detailsDefined in Vulkan.Core10.Enums.ImageLayout MethodspeekByteOff :: Ptr b -> Int -> IO ImageLayout #pokeByteOff :: Ptr b -> Int -> ImageLayout -> IO () #poke :: Ptr ImageLayout -> ImageLayout -> IO () # Source # Instance detailsDefined in Vulkan.Core10.Enums.ImageLayout Methods