vulkan-3.0.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.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://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).

See Also

AttachmentDescription, AttachmentDescription2, AttachmentDescriptionStencilLayout, AttachmentReference, AttachmentReference2, AttachmentReferenceStencilLayout, DescriptorImageInfo, ImageCreateInfo, ImageMemoryBarrier, 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. 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 must only be used as a read-only image in a shader (which can be read as a sampled image, combined image/sampler and/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

IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV must only be used as a read-only shading-rate-image. This layout is valid only for image subresources of images created with the IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV usage bit enabled.

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.

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.

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. 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. It is equivalent to IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.

Instances
Eq ImageLayout Source # 
Instance details

Defined in Graphics.Vulkan.Core10.Enums.ImageLayout

Ord ImageLayout Source # 
Instance details

Defined in Graphics.Vulkan.Core10.Enums.ImageLayout

Read ImageLayout Source # 
Instance details

Defined in Graphics.Vulkan.Core10.Enums.ImageLayout

Show ImageLayout Source # 
Instance details

Defined in Graphics.Vulkan.Core10.Enums.ImageLayout

Storable ImageLayout Source # 
Instance details

Defined in Graphics.Vulkan.Core10.Enums.ImageLayout

Zero ImageLayout Source # 
Instance details

Defined in Graphics.Vulkan.Core10.Enums.ImageLayout