| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.ImageView
- newtype VkComponentSwizzle = VkComponentSwizzle Int32
- pattern VK_COMPONENT_SWIZZLE_IDENTITY :: VkComponentSwizzle
- pattern VK_COMPONENT_SWIZZLE_ZERO :: VkComponentSwizzle
- pattern VK_COMPONENT_SWIZZLE_ONE :: VkComponentSwizzle
- pattern VK_COMPONENT_SWIZZLE_R :: VkComponentSwizzle
- pattern VK_COMPONENT_SWIZZLE_G :: VkComponentSwizzle
- pattern VK_COMPONENT_SWIZZLE_B :: VkComponentSwizzle
- pattern VK_COMPONENT_SWIZZLE_A :: VkComponentSwizzle
- newtype VkImageViewType = VkImageViewType Int32
- pattern VK_IMAGE_VIEW_TYPE_1D :: VkImageViewType
- pattern VK_IMAGE_VIEW_TYPE_2D :: VkImageViewType
- pattern VK_IMAGE_VIEW_TYPE_3D :: VkImageViewType
- pattern VK_IMAGE_VIEW_TYPE_CUBE :: VkImageViewType
- pattern VK_IMAGE_VIEW_TYPE_1D_ARRAY :: VkImageViewType
- pattern VK_IMAGE_VIEW_TYPE_2D_ARRAY :: VkImageViewType
- pattern VK_IMAGE_VIEW_TYPE_CUBE_ARRAY :: VkImageViewType
- newtype VkImageViewCreateFlags = VkImageViewCreateFlags VkFlags
- type VkImageView = Ptr VkImageView_T
- vkCreateImageView :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkImageViewCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pView" ::: Ptr VkImageView) -> IO VkResult
- vkDestroyImageView :: ("device" ::: VkDevice) -> ("imageView" ::: VkImageView) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- data VkComponentMapping = VkComponentMapping {}
- data VkImageSubresourceRange = VkImageSubresourceRange {}
- data VkImageViewCreateInfo = VkImageViewCreateInfo {}
Documentation
newtype VkComponentSwizzle Source #
VkComponentSwizzle - Specify how a component is swizzled
Description
VK_COMPONENT_SWIZZLE_IDENTITYspecifies that the component is set to the identity swizzle.
VK_COMPONENT_SWIZZLE_ZEROspecifies that the component is set to zero.VK_COMPONENT_SWIZZLE_ONEspecifies that the component is set to either 1 or 1.0, depending on whether the type of the image view format is integer or floating-point respectively, as determined by the Format Definition section for eachVkFormat.VK_COMPONENT_SWIZZLE_Rspecifies that the component is set to the value of the R component of the image.VK_COMPONENT_SWIZZLE_Gspecifies that the component is set to the value of the G component of the image.VK_COMPONENT_SWIZZLE_Bspecifies that the component is set to the value of the B component of the image.VK_COMPONENT_SWIZZLE_Aspecifies that the component is set to the value of the A component of the image.
Setting the identity swizzle on a component is equivalent to setting the identity mapping on that component. That is:
+-----------------------------------+-----------------------------------+ | Component | Identity Mapping | +===================================+===================================+ | @components.r@ | @VK_COMPONENT_SWIZZLE_R@ | +-----------------------------------+-----------------------------------+ | @components.g@ | @VK_COMPONENT_SWIZZLE_G@ | +-----------------------------------+-----------------------------------+ | @components.b@ | @VK_COMPONENT_SWIZZLE_B@ | +-----------------------------------+-----------------------------------+ | @components.a@ | @VK_COMPONENT_SWIZZLE_A@ | +-----------------------------------+-----------------------------------+ Component Mappings Equivalent To @VK_COMPONENT_SWIZZLE_IDENTITY@
See Also
Constructors
| VkComponentSwizzle Int32 |
pattern VK_COMPONENT_SWIZZLE_IDENTITY :: VkComponentSwizzle Source #
pattern VK_COMPONENT_SWIZZLE_ZERO :: VkComponentSwizzle Source #
pattern VK_COMPONENT_SWIZZLE_ONE :: VkComponentSwizzle Source #
pattern VK_COMPONENT_SWIZZLE_R :: VkComponentSwizzle Source #
pattern VK_COMPONENT_SWIZZLE_G :: VkComponentSwizzle Source #
pattern VK_COMPONENT_SWIZZLE_B :: VkComponentSwizzle Source #
pattern VK_COMPONENT_SWIZZLE_A :: VkComponentSwizzle Source #
newtype VkImageViewType Source #
VkImageViewType - Image view types
Description
The exact image view type is partially implicit, based on the image’s
type and sample count, as well as the view creation parameters as
described in the
image view compatibility table
for vkCreateImageView. This table also shows which SPIR-V
OpTypeImage Dim and Arrayed parameters correspond to each image
view type.
See Also
Constructors
| VkImageViewType Int32 |
pattern VK_IMAGE_VIEW_TYPE_1D :: VkImageViewType Source #
pattern VK_IMAGE_VIEW_TYPE_2D :: VkImageViewType Source #
pattern VK_IMAGE_VIEW_TYPE_3D :: VkImageViewType Source #
pattern VK_IMAGE_VIEW_TYPE_CUBE :: VkImageViewType Source #
pattern VK_IMAGE_VIEW_TYPE_1D_ARRAY :: VkImageViewType Source #
pattern VK_IMAGE_VIEW_TYPE_2D_ARRAY :: VkImageViewType Source #
pattern VK_IMAGE_VIEW_TYPE_CUBE_ARRAY :: VkImageViewType Source #
newtype VkImageViewCreateFlags Source #
VkImageViewCreateFlags - Reserved for future use
Description
VkImageViewCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| VkImageViewCreateFlags VkFlags |
type VkImageView = Ptr VkImageView_T Source #
VkImageView - Opaque handle to a image view object
Description
See Also
VkDescriptorImageInfo,
VkFramebufferCreateInfo,
vkCreateImageView, vkDestroyImageView
vkCreateImageView :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkImageViewCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pView" ::: Ptr VkImageView) -> IO VkResult Source #
vkCreateImageView - Create an image view from an existing image
Parameters
deviceis the logical device that creates the image view.
pCreateInfois a pointer to an instance of theVkImageViewCreateInfostructure containing parameters to be used to create the image view.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pViewpoints to aVkImageViewhandle in which the resulting image view object is returned.
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
VkImageCreateInfo at image creation time. This implicit parameter
can be overriden by chaining a
VkImageViewUsageCreateInfo
structure through the pNext member to VkImageViewCreateInfo as
described later in this section.
The remaining parameters are contained in the pCreateInfo.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkImageViewCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pViewmust be a valid pointer to aVkImageViewhandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks,
VkDevice, VkImageView,
VkImageViewCreateInfo
vkDestroyImageView :: ("device" ::: VkDevice) -> ("imageView" ::: VkImageView) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyImageView - Destroy an image view object
Parameters
deviceis the logical device that destroys the image view.
imageViewis the image view to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
Valid Usage
- All submitted commands that refer to
imageViewmust have completed execution
- If
VkAllocationCallbackswere provided whenimageViewwas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenimageViewwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
imageViewis notVK_NULL_HANDLE,imageViewmust be a validVkImageViewhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
imageViewis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
imageViewmust be externally synchronized
See Also
data VkComponentMapping Source #
VkComponentMapping - Structure specifying a color component mapping
Description
Valid Usage (Implicit)
rmust be a validVkComponentSwizzlevalue
gmust be a validVkComponentSwizzlevaluebmust be a validVkComponentSwizzlevalueamust be a validVkComponentSwizzlevalue
See Also
VkAndroidHardwareBufferFormatPropertiesANDROID,
VkComponentSwizzle, VkImageViewCreateInfo,
VkSamplerYcbcrConversionCreateInfo
Constructors
| VkComponentMapping | |
Fields
| |
data VkImageSubresourceRange Source #
VkImageSubresourceRange - Structure specifying a image subresource range
Description
The number of mipmap levels and array layers must be a subset of the
image subresources in the image. If an application wants to use all mip
levels or layers in an image after the baseMipLevel or
baseArrayLayer, it can set levelCount and layerCount to the
special values VK_REMAINING_MIP_LEVELS and VK_REMAINING_ARRAY_LAYERS
without knowing the exact number of mip levels or layers.
For cube and cube array image views, the layers of the image view
starting at baseArrayLayer correspond to faces in the order +X, -X,
+Y, -Y, +Z, -Z. For cube arrays, each set of six sequential layers is a
single cube, so the number of cube maps in a cube map array view is
layerCount / 6, and image array layer (baseArrayLayer + i) is
face index (i mod 6) of cube i / 6. If the number of layers in the
view, whether set explicitly in layerCount or implied by
VK_REMAINING_ARRAY_LAYERS, is not a multiple of 6, behavior when
indexing the last cube is undefined.
aspectMask must be only VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT if format
is a color, depth-only or stencil-only format, respectively, except if
format is a
multi-planar format.
If using a depth/stencil format with both depth and stencil components,
aspectMask must include at least one of VK_IMAGE_ASPECT_DEPTH_BIT
and VK_IMAGE_ASPECT_STENCIL_BIT, and can include both.
When the VkImageSubresourceRange structure is used to select a subset
of the slices of a 3D image’s mip level in order to create a 2D or 2D
array image view of a 3D image created with
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, baseArrayLayer and
layerCount specify the first slice index and the number of slices to
include in the created image view. Such an image view can be used as a
framebuffer attachment that refers only to the specified range of slices
of the selected mip level. However, any layout transitions performed on
such an attachment view during a render pass instance still apply to the
entire subresource referenced which includes all the slices of the
selected mip level.
When using an imageView of a depth/stencil image to populate a
descriptor set (e.g. for sampling in the shader, or for use as an input
attachment), the aspectMask must only include one bit and selects
whether the imageView is used for depth reads (i.e. using a
floating-point sampler or input attachment in the shader) or stencil
reads (i.e. using an unsigned integer sampler or input attachment in the
shader). When an imageView of a depth/stencil image is used as a
depth/stencil framebuffer attachment, the aspectMask is ignored and
both depth and stencil image subresources are used.
The components member is of type VkComponentMapping, and describes a
remapping from components of the image to components of the vector
returned by shader image instructions. This remapping must be identity
for storage image descriptors, input attachment descriptors, framebuffer
attachments, and any VkImageView used with a combined image sampler
that enables
sampler Y’CBCR conversion.
When creating a VkImageView, if
sampler Y’CBCR conversion
is enabled in the sampler, the aspectMask of a subresourceRange used
by the VkImageView must be VK_IMAGE_ASPECT_COLOR_BIT.
When creating a VkImageView, if sampler Y’CBCR conversion is not
enabled in the sampler and the image format is
multi-planar,
the image must have been created with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the aspectMask of the
VkImageView’s subresourceRange must be
VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT or
VK_IMAGE_ASPECT_PLANE_2_BIT.
Valid Usage
- If
levelCountis notVK_REMAINING_MIP_LEVELS, it must be greater than0
- If
layerCountis notVK_REMAINING_ARRAY_LAYERS, it must be greater than0 - If
aspectMaskincludesVK_IMAGE_ASPECT_COLOR_BIT, then it must not include any ofVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT
Valid Usage (Implicit)
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvalues
aspectMaskmust not be0
See Also
VkImageAspectFlags,
VkImageMemoryBarrier,
VkImageViewCreateInfo,
vkCmdClearColorImage,
vkCmdClearDepthStencilImage
Constructors
| VkImageSubresourceRange | |
Fields
| |
data VkImageViewCreateInfo Source #
VkImageViewCreateInfo - Structure specifying parameters of a newly created image view
Description
If image was created with the VK_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 VK_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
VK_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
VkSamplerYcbcrConversion
to that used to create the sampler must be passed to
vkCreateImageView in a
VkSamplerYcbcrConversionInfo
added to the pNext chain of VkImageViewCreateInfo.
If the image has a
multi-planar
format and subresourceRange.aspectMask is
VK_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 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and
the image has a
multi-planar
format, and if subresourceRange.aspectMask is
VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or
VK_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, | Image parameters | View parameters | | Arrayed | | | | , | | | | MS | | | +=========+========================+===================================+ | | @imageType@ = | @baseArrayLayer@, @layerCount@, | | | ci.@imageType@ | and @levelCount@ are members of | | | @width@ = | the @subresourceRange@ member. | | | ci.@extent.width@ | | | | @height@ = | | | | ci.@extent.height@ | | | | @depth@ = | | | | ci.@extent.depth@ | | | | @arrayLayers@ = | | | | ci.@arrayLayers@ | | | | @samples@ = | | | | ci.@samples@ | | | | @flags@ = ci.@flags@ | | | | where ci is the | | | | 'Graphics.Vulkan.Core1 | | | | 0.Image.VkImageCreateI | | | | nfo' | | | | used to create | | | | @image@. | | +---------+------------------------+-----------------------------------+ | __1D, | @imageType@ = | @viewType@ = | | 0, 0__ | @VK_IMAGE_TYPE_1D@ | @VK_IMAGE_VIEW_TYPE_1D@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ = 1 | @layerCount@ = 1 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 1 | | | | @samples@ = 1 | | +---------+------------------------+-----------------------------------+ | __1D, | @imageType@ = | @viewType@ = | | 1, 0__ | @VK_IMAGE_TYPE_1D@ | @VK_IMAGE_VIEW_TYPE_1D_ARRAY@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ = 1 | @layerCount@ ≥ 1 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 1 | | | | @samples@ = 1 | | +---------+------------------------+-----------------------------------+ | __2D, | @imageType@ = | @viewType@ = | | 0, 0__ | @VK_IMAGE_TYPE_2D@ | @VK_IMAGE_VIEW_TYPE_2D@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ ≥ 1 | @layerCount@ = 1 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 1 | | | | @samples@ = 1 | | +---------+------------------------+-----------------------------------+ | __2D, | @imageType@ = | @viewType@ = | | 1, 0__ | @VK_IMAGE_TYPE_2D@ | @VK_IMAGE_VIEW_TYPE_2D_ARRAY@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ ≥ 1 | @layerCount@ ≥ 1 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 1 | | | | @samples@ = 1 | | +---------+------------------------+-----------------------------------+ | __2D, | @imageType@ = | @viewType@ = | | 0, 1__ | @VK_IMAGE_TYPE_2D@ | @VK_IMAGE_VIEW_TYPE_2D@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ ≥ 1 | @layerCount@ = 1 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 1 | | | | @samples@ > 1 | | +---------+------------------------+-----------------------------------+ | __2D, | @imageType@ = | @viewType@ = | | 1, 1__ | @VK_IMAGE_TYPE_2D@ | @VK_IMAGE_VIEW_TYPE_2D_ARRAY@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ ≥ 1 | @layerCount@ ≥ 1 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 1 | | | | @samples@ > 1 | | +---------+------------------------+-----------------------------------+ | __CUBE, | @imageType@ = | @viewType@ = | | 0, 0__ | @VK_IMAGE_TYPE_2D@ | @VK_IMAGE_VIEW_TYPE_CUBE@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ = @width@ | @layerCount@ = 6 | | | @depth@ = 1 | | | | @arrayLayers@ ≥ 6 | | | | @samples@ = 1 | | | | @flags@ includes | | | | @VK_IMAGE_CREATE_CUBE_ | | | | COMPATIBLE_BIT@ | | +---------+------------------------+-----------------------------------+ | __CUBE, | @imageType@ = | @viewType@ = | | 1, 0__ | @VK_IMAGE_TYPE_2D@ | @VK_IMAGE_VIEW_TYPE_CUBE_ARRAY@ | | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @height@ = width | @layerCount@ = 6 × /N/, /N/ ≥ 1 | | | @depth@ = 1 | | | | /N/ ≥ 1 | | | | @arrayLayers@ ≥ 6 × | | | | /N/ | | | | @samples@ = 1 | | | | @flags@ includes | | | | @VK_IMAGE_CREATE_CUBE_ | | | | COMPATIBLE_BIT@ | | +---------+------------------------+-----------------------------------+ | __3D, | @imageType@ = | @viewType@ = | | 0, 0__ | @VK_IMAGE_TYPE_3D@ | @VK_IMAGE_VIEW_TYPE_3D@ | | | @width@ ≥ 1 | @baseArrayLayer@ = 0 | | | @height@ ≥ 1 | @layerCount@ = 1 | | | @depth@ ≥ 1 | | | | @arrayLayers@ = 1 | | | | @samples@ = 1 | | +---------+------------------------+-----------------------------------+ | __3D, | @imageType@ = | @viewType@ = | | 0, 0__ | @VK_IMAGE_TYPE_3D@ | @VK_IMAGE_VIEW_TYPE_2D@ | | | @width@ ≥ 1 | @levelCount@ = 1 | | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @depth@ ≥ 1 | @layerCount@ = 1 | | | @arrayLayers@ = 1 | | | | @samples@ = 1 | | | | @flags@ includes | | | | @VK_IMAGE_CREATE_2D_AR | | | | RAY_COMPATIBLE_BIT@ | | | | @flags@ does not | | | | include | | | | @VK_IMAGE_CREATE_SPARS | | | | E_BINDING_BIT@, | | | | @VK_IMAGE_CREATE_SPARS | | | | E_RESIDENCY_BIT@, | | | | and | | | | @VK_IMAGE_CREATE_SPARS | | | | E_ALIASED_BIT@ | | +---------+------------------------+-----------------------------------+ | __3D, | @imageType@ = | @viewType@ = | | 0, 0__ | @VK_IMAGE_TYPE_3D@ | @VK_IMAGE_VIEW_TYPE_2D_ARRAY@ | | | @width@ ≥ 1 | @levelCount@ = 1 | | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 | | | @depth@ ≥ 1 | @layerCount@ ≥ 1 | | | @arrayLayers@ = 1 | | | | @samples@ = 1 | | | | @flags@ includes | | | | @VK_IMAGE_CREATE_2D_AR | | | | RAY_COMPATIBLE_BIT@ | | | | @flags@ does not | | | | include | | | | @VK_IMAGE_CREATE_SPARS | | | | E_BINDING_BIT@, | | | | @VK_IMAGE_CREATE_SPARS | | | | E_RESIDENCY_BIT@, | | | | and | | | | @VK_IMAGE_CREATE_SPARS | | | | E_ALIASED_BIT@ | | +---------+------------------------+-----------------------------------+ Image and image view parameter compatibility requirements
Valid Usage
- If
imagewas not created withVK_IMAGE_CREATE_CUBE_COMPATIBLE_BITthenviewTypemust not beVK_IMAGE_VIEW_TYPE_CUBEorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY
- If the
image cubemap arrays
feature is not enabled,
viewTypemust not beVK_IMAGE_VIEW_TYPE_CUBE_ARRAY - If
imagewas created withVK_IMAGE_TYPE_3Dbut withoutVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset thenviewTypemust not beVK_IMAGE_VIEW_TYPE_2DorVK_IMAGE_VIEW_TYPE_2D_ARRAY - If
imagewas created withVK_IMAGE_TILING_LINEAR,formatmust be format that has at least one supported feature bit present in the value ofVkFormatProperties::linearTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat imagemust have been created with ausagevalue containing at least one ofVK_IMAGE_USAGE_SAMPLED_BIT,VK_IMAGE_USAGE_STORAGE_BIT,VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, orVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT- If
imagewas created withVK_IMAGE_TILING_LINEARandusagecontainsVK_IMAGE_USAGE_SAMPLED_BIT,formatmust be supported for sampled images, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_BITflag inVkFormatProperties::linearTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_LINEARandusagecontainsVK_IMAGE_USAGE_STORAGE_BIT,formatmust be supported for storage images, as specified by theVK_FORMAT_FEATURE_STORAGE_IMAGE_BITflag inVkFormatProperties::linearTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_LINEARandusagecontainsVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,formatmust be supported for color attachments, as specified by theVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BITflag inVkFormatProperties::linearTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_LINEARandusagecontainsVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,formatmust be supported for depth/stencil attachments, as specified by theVK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITflag inVkFormatProperties::linearTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_OPTIMAL,formatmust be format that has at least one supported feature bit present in the value ofVkFormatProperties::optimalTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_OPTIMALandusagecontainsVK_IMAGE_USAGE_SAMPLED_BIT,formatmust be supported for sampled images, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_OPTIMALandusagecontainsVK_IMAGE_USAGE_STORAGE_BIT,formatmust be supported for storage images, as specified by theVK_FORMAT_FEATURE_STORAGE_IMAGE_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_OPTIMALandusagecontainsVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,formatmust be supported for color attachments, as specified by theVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat - If
imagewas created withVK_IMAGE_TILING_OPTIMALandusagecontainsVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,formatmust be supported for depth/stencil attachments, as specified by theVK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byvkGetPhysicalDeviceFormatPropertieswith the same value offormat subresourceRange.baseMipLevelmust be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created- If
subresourceRange.levelCountis notVK_REMAINING_MIP_LEVELS,subresourceRange.baseMipLevel+subresourceRange.levelCountmust be less than or equal to themipLevelsspecified inVkImageCreateInfowhenimagewas created - If
imageis not a 3D image created withVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset, orviewTypeis notVK_IMAGE_VIEW_TYPE_2DorVK_IMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange::baseArrayLayermust be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created - If
subresourceRange::layerCountis notVK_REMAINING_ARRAY_LAYERS,imageis not a 3D image created withVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset, orviewTypeis notVK_IMAGE_VIEW_TYPE_2DorVK_IMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange::layerCountmust be non-zero andsubresourceRange::baseArrayLayer+subresourceRange::layerCountmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhenimagewas created - If
imageis a 3D image created withVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset, andviewTypeisVK_IMAGE_VIEW_TYPE_2DorVK_IMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange::baseArrayLayermust be less than theextent.depthspecified inVkImageCreateInfowhenimagewas created - If
subresourceRange::layerCountis notVK_REMAINING_ARRAY_LAYERS,imageis a 3D image created withVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset, andviewTypeisVK_IMAGE_VIEW_TYPE_2DorVK_IMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange::layerCountmust be non-zero andsubresourceRange::baseArrayLayer+subresourceRange::layerCountmust be less than or equal to theextent.depthspecified inVkImageCreateInfowhenimagewas created - If
imagewas created with theVK_IMAGE_CREATE_MUTABLE_FORMAT_BITflag,formatmust be compatible with theformatused to createimage, as defined in Format Compatibility Classes - If
imagewas created with theVK_IMAGE_CREATE_MUTABLE_FORMAT_BITflag, but without theVK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BITflag, and if theformatof theimageis not a multi-planar format,formatmust be compatible with theformatused to createimage, as defined in Format Compatibility Classes - If
imagewas created with theVK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BITflag,formatmust be compatible with, or must be an uncompressed format that is size-compatible with, theformatused to createimage. - If
imagewas created with theVK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BITflag, thelevelCountandlayerCountmembers ofsubresourceRangemust both be1. - If a
VkImageFormatListCreateInfoKHRstructure was included in thepNextchain of theVkImageCreateInfostruct used when creatingimageand theviewFormatCountfield ofVkImageFormatListCreateInfoKHRis not zero thenformatmust be one of the formats inVkImageFormatListCreateInfoKHR::pViewFormats. - If
imagewas created with theVK_IMAGE_CREATE_MUTABLE_FORMAT_BITflag, if theformatof theimageis a multi-planar format, and ifsubresourceRange.aspectMaskis one ofVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT, thenformatmust be compatible with theVkFormatfor the plane of theimageformatindicated bysubresourceRange.aspectMask, as defined in {html_spec_relative}#features-formats-compatible-planes - If
imagewas not created with theVK_IMAGE_CREATE_MUTABLE_FORMAT_BITflag, or if theformatof theimageis a multi-planar format and ifsubresourceRange.aspectMaskisVK_IMAGE_ASPECT_COLOR_BIT,formatmust be identical to theformatused to createimage - If
imageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject subresourceRangeandviewTypemust be compatible with the image, as described in the compatibility tableIf
imagehas an external format:formatmust beVK_FORMAT_UNDEFINED- The
pNextchain must contain an instance ofVkSamplerYcbcrConversionInfowith aconversionobject created with the same external format asimage - All members of
componentsmust beVK_COMPONENT_SWIZZLE_IDENTITY
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkImageViewUsageCreateInfoorVkSamplerYcbcrConversionInfo - Each
sTypemember in thepNextchain must be unique flagsmust be0imagemust be a validVkImagehandleviewTypemust be a validVkImageViewTypevalueformatmust be a validVkFormatvaluecomponentsmust be a validVkComponentMappingstructuresubresourceRangemust be a validVkImageSubresourceRangestructure
See Also
VkComponentMapping, VkFormat,
VkImage,
VkImageSubresourceRange, VkImageViewCreateFlags, VkImageViewType,
VkStructureType, vkCreateImageView
Constructors
| VkImageViewCreateInfo | |
Fields
| |