HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Core10.Enums.ImageLayout

  • 1 type
  • Packagevulkan-3.27
  • Exports26
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceImageLayout.hs
newtypenewtype ImageLayout
#

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/latest/html/vkspec.html#clears and https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#copies). For use as a framebuffer attachment, this is a member in the substructures of the RenderPassCreateInfo (see Render Pass). For use in a descriptor set, this is a member in the DescriptorImageInfo structure (see https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptors-sets-updates).

If the unifiedImageLayouts feature is enabled, the IMAGE_LAYOUT_GENERAL image layout may be used in place of the other layouts where allowed with no loss of performance.

IMAGE_LAYOUT_GENERAL can be a useful catch-all image layout, but there are situations where a dedicated image layout must be used instead. Some examples include:

While IMAGE_LAYOUT_GENERAL suggests that all types of device access is possible, it does not mean that all patterns of memory accesses are safe in all situations. Common Render Pass Data Races outlines some situations where data races are unavoidable. For example, when a subresource is used as both an attachment and a sampled image (i.e., not an input attachment), enabling feedback loop adds extra guarantees which IMAGE_LAYOUT_GENERAL alone does not.

See Also

VK_VERSION_1_0, AttachmentDescription, AttachmentDescription2, AttachmentDescriptionStencilLayout, AttachmentReference, AttachmentReference2, AttachmentReferenceStencilLayout, BlitImageInfo2, CopyBufferToImageInfo2, CopyImageInfo2, CopyImageToBufferInfo2, CopyImageToImageInfo, CopyImageToMemoryInfo, CopyMemoryToImageIndirectInfoKHR, CopyMemoryToImageInfo, DataGraphPipelineResourceInfoImageLayoutARM, DescriptorImageInfo, DeviceMemoryImageCopyKHR, HostImageLayoutTransitionInfo, ImageCreateInfo, ImageDescriptorInfoEXT, ImageMemoryBarrier, ImageMemoryBarrier2, PhysicalDeviceHostImageCopyProperties, PhysicalDeviceVulkan14Properties, RenderingAttachmentInfo, RenderingFragmentDensityMapAttachmentInfoEXT, RenderingFragmentShadingRateAttachmentInfoKHR, ResolveImageInfo2, bindOpticalFlowSessionImageNV, cmdBindInvocationMaskHUAWEI, cmdBindShadingRateImageNV, cmdBlitImage, cmdClearColorImage, cmdClearDepthStencilImage, cmdCopyBufferToImage, cmdCopyImage, cmdCopyImageToBuffer, cmdCopyMemoryToImageIndirectNV, cmdResolveImage

Constructors

Instances6Eq, Ord, Read, Show, Storable, Zero