vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Core10.Enums.ImageLayout

Synopsis

Documentation

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

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

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

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

See Also

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

Constructors

ImageLayout Int32 

Bundled Patterns

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_ZERO_INITIALIZED_EXT :: ImageLayout 
pattern IMAGE_LAYOUT_TENSOR_ALIASING_ARM :: 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_RENDERING_LOCAL_READ :: 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 

Instances

Instances details
Eq ImageLayout Source # 
Instance details

Defined in Vulkan.Core10.Enums.ImageLayout

Ord ImageLayout Source # 
Instance details

Defined in Vulkan.Core10.Enums.ImageLayout

Storable ImageLayout Source # 
Instance details

Defined in Vulkan.Core10.Enums.ImageLayout

Read ImageLayout Source # 
Instance details

Defined in Vulkan.Core10.Enums.ImageLayout

Show ImageLayout Source # 
Instance details

Defined in Vulkan.Core10.Enums.ImageLayout

Zero ImageLayout Source # 
Instance details

Defined in Vulkan.Core10.Enums.ImageLayout