vulkan-3.0.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.ImageView

Synopsis

Documentation

createImageView :: PokeChain a => Device -> ImageViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ImageView Source #

vkCreateImageView - Create an image view from an existing image

Parameters

  • Device is the logical device that creates the image view.
  • pCreateInfo is a pointer to a ImageViewCreateInfo structure containing parameters to be used to create the image view.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.
  • pView is a pointer to a ImageView handle in which the resulting image view object is returned.

Valid Usage (Implicit)

Return Codes

Success
Failure

See Also

AllocationCallbacks, Device, ImageView, ImageViewCreateInfo

withImageView :: PokeChain a => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> (ImageView -> IO r) -> IO r Source #

A safe wrapper for createImageView and destroyImageView using bracket

The allocated value must not be returned from the provided computation

destroyImageView :: Device -> ImageView -> ("allocator" ::: Maybe AllocationCallbacks) -> IO () Source #

vkDestroyImageView - Destroy an image view object

Parameters

  • Device is the logical device that destroys the image view.

Valid Usage

  • All submitted commands that refer to ImageView must have completed execution

Valid Usage (Implicit)

Host Synchronization

  • Host access to ImageView must be externally synchronized

See Also

AllocationCallbacks, Device, ImageView

data ComponentMapping Source #

VkComponentMapping - Structure specifying a color component mapping

Valid Usage (Implicit)

See Also

AndroidHardwareBufferFormatPropertiesANDROID, ComponentSwizzle, ImageViewCreateInfo, SamplerYcbcrConversionCreateInfo

Constructors

ComponentMapping 

Fields

Instances
Show ComponentMapping Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

Storable ComponentMapping Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

FromCStruct ComponentMapping Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

ToCStruct ComponentMapping Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

Zero ComponentMapping Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

data ImageViewCreateInfo (es :: [Type]) Source #

VkImageViewCreateInfo - Structure specifying parameters of a newly created image view

Description

Some of the Image creation parameters are inherited by the view. In particular, image view creation inherits the implicit parameter usage specifying the allowed usages of the image view that, by default, takes the value of the corresponding usage parameter specified in ImageCreateInfo at image creation time. If the image was has a depth-stencil format and was created with a ImageStencilUsageCreateInfo structure included in the pNext chain of ImageCreateInfo, the usage is calculated based on the subresource.aspectMask provided:

If Image was created with the IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, and if the Format of the image is not multi-planar, Format can be different from the image’s format, but if Image was created without the IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and they are not equal they must be compatible. Image format compatibility is defined in the Format Compatibility Classes section. Views of compatible formats will have the same mapping between texel coordinates and memory locations irrespective of the Format, with only the interpretation of the bit pattern changing.

Note

Values intended to be used with one view format may not be exactly preserved when written or read through a different format. For example, an integer value that happens to have the bit pattern of a floating point denorm or NaN may be flushed or canonicalized when written or read through a view with a floating point format. Similarly, a value written through a signed normalized format that has a bit pattern exactly equal to -2b may be changed to -2b + 1 as described in Conversion from Normalized Fixed-Point to Floating-Point.

If Image was created with the IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, Format must be compatible with the image’s format as described above, or must be an uncompressed format in which case it must be size-compatible with the image’s format, as defined for copying data between images In this case the resulting image view’s texel dimensions equal the dimensions of the selected mip level divided by the compressed texel block size and rounded up.

If the image view is to be used with a sampler which supports sampler Y′CBCR conversion, an identically defined object of type SamplerYcbcrConversion to that used to create the sampler must be passed to createImageView in a SamplerYcbcrConversionInfo included in the pNext chain of ImageViewCreateInfo. Conversely, if a SamplerYcbcrConversion object is passed to createImageView, an identically defined SamplerYcbcrConversion object must be used when sampling the image.

If the image has a multi-planar Format and subresourceRange.aspectMask is IMAGE_ASPECT_COLOR_BIT, Format must be identical to the image Format, and the sampler to be used with the image view must enable sampler Y′CBCR conversion.

If Image was created with the IMAGE_CREATE_MUTABLE_FORMAT_BIT and the image has a multi-planar Format, and if subresourceRange.aspectMask is IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT, or IMAGE_ASPECT_PLANE_2_BIT, Format must be compatible with the corresponding plane of the image, and the sampler to be used with the image view must not enable sampler Y′CBCR conversion. The width and height of the single-plane image view must be derived from the multi-planar image’s dimensions in the manner listed for plane compatibility for the plane.

Any view of an image plane will have the same mapping between texel coordinates and memory locations as used by the channels of the color aspect, subject to the formulae relating texel coordinates to lower-resolution planes as described in Chroma Reconstruction. That is, if an R or B plane has a reduced resolution relative to the G plane of the multi-planar image, the image view operates using the (uplane, vplane) unnormalized coordinates of the reduced-resolution plane, and these coordinates access the same memory locations as the (ucolor, vcolor) unnormalized coordinates of the color aspect for which chroma reconstruction operations operate on the same (uplane, vplane) or (iplane, jplane) coordinates.

Dim, Arrayed, MS Image parameters View parameters
ImageType = ci.ImageType width = ci.extent.width height = ci.extent.height depth = ci.extent.depth arrayLayers = ci.arrayLayers samples = ci.samples Flags = ci.Flags where ci is the ImageCreateInfo used to create Image. baseArrayLayer, layerCount, and levelCount are members of the subresourceRange member.
__1D, 0, 0__ ImageType = IMAGE_TYPE_1D width ≥ 1 height = 1 depth = 1 arrayLayers ≥ 1 samples = 1 viewType = IMAGE_VIEW_TYPE_1D baseArrayLayer ≥ 0 layerCount = 1
__1D, 1, 0__ ImageType = IMAGE_TYPE_1D width ≥ 1 height = 1 depth = 1 arrayLayers ≥ 1 samples = 1 viewType = IMAGE_VIEW_TYPE_1D_ARRAY baseArrayLayer ≥ 0 layerCount ≥ 1
__2D, 0, 0__ ImageType = IMAGE_TYPE_2D width ≥ 1 height ≥ 1 depth = 1 arrayLayers ≥ 1 samples = 1 viewType = IMAGE_VIEW_TYPE_2D baseArrayLayer ≥ 0 layerCount = 1
__2D, 1, 0__ ImageType = IMAGE_TYPE_2D width ≥ 1 height ≥ 1 depth = 1 arrayLayers ≥ 1 samples = 1 viewType = IMAGE_VIEW_TYPE_2D_ARRAY baseArrayLayer ≥ 0 layerCount ≥ 1
__2D, 0, 1__ ImageType = IMAGE_TYPE_2D width ≥ 1 height ≥ 1 depth = 1 arrayLayers ≥ 1 samples > 1 viewType = IMAGE_VIEW_TYPE_2D baseArrayLayer ≥ 0 layerCount = 1
__2D, 1, 1__ ImageType = IMAGE_TYPE_2D width ≥ 1 height ≥ 1 depth = 1 arrayLayers ≥ 1 samples > 1 viewType = IMAGE_VIEW_TYPE_2D_ARRAY baseArrayLayer ≥ 0 layerCount ≥ 1
__CUBE, 0, 0__ ImageType = IMAGE_TYPE_2D width ≥ 1 height = width depth = 1 arrayLayers ≥ 6 samples = 1 Flags includes IMAGE_CREATE_CUBE_COMPATIBLE_BIT viewType = IMAGE_VIEW_TYPE_CUBE baseArrayLayer ≥ 0 layerCount = 6
__CUBE, 1, 0__ ImageType = IMAGE_TYPE_2D width ≥ 1 height = width depth = 1 N ≥ 1 arrayLayers ≥ 6 × N samples = 1 Flags includes IMAGE_CREATE_CUBE_COMPATIBLE_BIT viewType = IMAGE_VIEW_TYPE_CUBE_ARRAY baseArrayLayer ≥ 0 layerCount = 6 × N, N ≥ 1
__3D, 0, 0__ ImageType = IMAGE_TYPE_3D width ≥ 1 height ≥ 1 depth ≥ 1 arrayLayers = 1 samples = 1 viewType = IMAGE_VIEW_TYPE_3D baseArrayLayer = 0 layerCount = 1
__3D, 0, 0__ ImageType = IMAGE_TYPE_3D width ≥ 1 height ≥ 1 depth ≥ 1 arrayLayers = 1 samples = 1 Flags includes IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT Flags does not include IMAGE_CREATE_SPARSE_BINDING_BIT, IMAGE_CREATE_SPARSE_RESIDENCY_BIT, and IMAGE_CREATE_SPARSE_ALIASED_BIT viewType = IMAGE_VIEW_TYPE_2D levelCount = 1 baseArrayLayer ≥ 0 layerCount = 1
__3D, 0, 0__ ImageType = IMAGE_TYPE_3D width ≥ 1 height ≥ 1 depth ≥ 1 arrayLayers = 1 samples = 1 Flags includes IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT Flags does not include IMAGE_CREATE_SPARSE_BINDING_BIT, IMAGE_CREATE_SPARSE_RESIDENCY_BIT, and IMAGE_CREATE_SPARSE_ALIASED_BIT viewType = IMAGE_VIEW_TYPE_2D_ARRAY levelCount = 1 baseArrayLayer ≥ 0 layerCount ≥ 1

Image and image view parameter compatibility requirements

Valid Usage

Valid Usage (Implicit)

See Also

ComponentMapping, Format, Image, ImageSubresourceRange, ImageViewCreateFlags, ImageViewType, StructureType, createImageView

Constructors

ImageViewCreateInfo 

Fields

Instances
Extensible ImageViewCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

Show (Chain es) => Show (ImageViewCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

PeekChain es => FromCStruct (ImageViewCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

PokeChain es => ToCStruct (ImageViewCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView

es ~ ([] :: [Type]) => Zero (ImageViewCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.ImageView