Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- createImageView :: forall a io. (Extendss ImageViewCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io ImageView
- withImageView :: forall a io r. (Extendss ImageViewCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> (io ImageView -> (ImageView -> io ()) -> r) -> r
- destroyImageView :: forall io. MonadIO io => Device -> ImageView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data ComponentMapping = ComponentMapping {}
- data ImageSubresourceRange = ImageSubresourceRange {}
- data ImageViewCreateInfo (es :: [Type]) = ImageViewCreateInfo {}
- newtype ImageView = ImageView Word64
- newtype ImageViewType where
- ImageViewType Int32
- pattern IMAGE_VIEW_TYPE_1D :: ImageViewType
- pattern IMAGE_VIEW_TYPE_2D :: ImageViewType
- pattern IMAGE_VIEW_TYPE_3D :: ImageViewType
- pattern IMAGE_VIEW_TYPE_CUBE :: ImageViewType
- pattern IMAGE_VIEW_TYPE_1D_ARRAY :: ImageViewType
- pattern IMAGE_VIEW_TYPE_2D_ARRAY :: ImageViewType
- pattern IMAGE_VIEW_TYPE_CUBE_ARRAY :: ImageViewType
- newtype ComponentSwizzle where
- ComponentSwizzle Int32
- pattern COMPONENT_SWIZZLE_IDENTITY :: ComponentSwizzle
- pattern COMPONENT_SWIZZLE_ZERO :: ComponentSwizzle
- pattern COMPONENT_SWIZZLE_ONE :: ComponentSwizzle
- pattern COMPONENT_SWIZZLE_R :: ComponentSwizzle
- pattern COMPONENT_SWIZZLE_G :: ComponentSwizzle
- pattern COMPONENT_SWIZZLE_B :: ComponentSwizzle
- pattern COMPONENT_SWIZZLE_A :: ComponentSwizzle
- newtype ImageViewCreateFlagBits where
- ImageViewCreateFlagBits Flags
- pattern IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT :: ImageViewCreateFlagBits
- pattern IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: ImageViewCreateFlagBits
- pattern IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT :: ImageViewCreateFlagBits
- type ImageViewCreateFlags = ImageViewCreateFlagBits
Documentation
:: forall a io. (Extendss ImageViewCreateInfo a, PokeChain a, MonadIO io) | |
=> Device |
|
-> ImageViewCreateInfo a |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io ImageView |
vkCreateImageView - Create an image view from an existing image
Valid Usage
-
ImageViewCreateInfo
::image
must have been created fromdevice
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCreateInfo
must be a valid pointer to a validImageViewCreateInfo
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pView
must be a valid pointer to aImageView
handle
Return Codes
See Also
VK_VERSION_1_0,
AllocationCallbacks
,
Device
, ImageView
,
ImageViewCreateInfo
withImageView :: forall a io r. (Extendss ImageViewCreateInfo a, PokeChain a, MonadIO io) => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> (io ImageView -> (ImageView -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createImageView
and destroyImageView
To ensure that destroyImageView
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,)
as the last argument.
:: forall io. MonadIO io | |
=> Device |
|
-> ImageView |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyImageView - Destroy an image view object
Valid Usage
- If
AllocationCallbacks
were provided whenimageView
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenimageView
was created,pAllocator
must beNULL
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
imageView
is notNULL_HANDLE
,imageView
must be a validImageView
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
imageView
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
imageView
must be externally synchronized
See Also
data ComponentMapping Source #
VkComponentMapping - Structure specifying a color component mapping
Valid Usage (Implicit)
See Also
VK_VERSION_1_0,
AndroidHardwareBufferFormatProperties2ANDROID
,
AndroidHardwareBufferFormatPropertiesANDROID
,
BufferCollectionPropertiesFUCHSIA
,
ComponentSwizzle
,
ImageViewCreateInfo
,
SamplerBorderColorComponentMappingCreateInfoEXT
,
SamplerYcbcrConversionCreateInfo
,
ScreenBufferFormatPropertiesQNX
,
VkVideoFormatPropertiesKHR
ComponentMapping | |
|
Instances
data ImageSubresourceRange Source #
VkImageSubresourceRange - Structure specifying an 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 REMAINING_MIP_LEVELS
and
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
REMAINING_ARRAY_LAYERS
, is not a multiple
of 6, the last cube map in the array must not be accessed.
aspectMask
must be only
IMAGE_ASPECT_COLOR_BIT
,
IMAGE_ASPECT_DEPTH_BIT
or
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
IMAGE_ASPECT_DEPTH_BIT
and
IMAGE_ASPECT_STENCIL_BIT
, and
can include both.
When the ImageSubresourceRange
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
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 image view 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, which selects
whether the image view 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 image view 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.
When creating a ImageView
, if
sampler Y′CBCR conversion
is enabled in the sampler, the aspectMask
of a subresourceRange
used
by the ImageView
must be
IMAGE_ASPECT_COLOR_BIT
.
When creating a ImageView
, 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
IMAGE_CREATE_MUTABLE_FORMAT_BIT
,
and the aspectMask
of the ImageView
’s
subresourceRange
must be
IMAGE_ASPECT_PLANE_0_BIT
,
IMAGE_ASPECT_PLANE_1_BIT
or
IMAGE_ASPECT_PLANE_2_BIT
.
Valid Usage
- If
levelCount
is notREMAINING_MIP_LEVELS
, it must be greater than0
- If
layerCount
is notREMAINING_ARRAY_LAYERS
, it must be greater than0
- If
aspectMask
includesIMAGE_ASPECT_COLOR_BIT
, then it must not include any ofIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
-
aspectMask
must not includeVK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT
for any index i
Valid Usage (Implicit)
-
aspectMask
must be a valid combination ofImageAspectFlagBits
values
See Also
VK_VERSION_1_0,
HostImageLayoutTransitionInfoEXT
,
ImageAspectFlags
,
ImageMemoryBarrier
,
ImageMemoryBarrier2
,
ImageViewCreateInfo
,
cmdClearColorImage
,
cmdClearDepthStencilImage
ImageSubresourceRange | |
|
Instances
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. The
implicit usage
can be overridden by adding a
ImageViewUsageCreateInfo
structure to the pNext
chain, but the view usage must be a subset of
the image usage. If image
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
aspectMask
includes onlyIMAGE_ASPECT_STENCIL_BIT
, the implicitusage
is equal toImageStencilUsageCreateInfo
::stencilUsage
. - If
aspectMask
includes onlyIMAGE_ASPECT_DEPTH_BIT
, the implicitusage
is equal toImageCreateInfo
::usage
. - If both aspects are included in
aspectMask
, the implicitusage
is equal to the intersection ofImageCreateInfo
::usage
andImageStencilUsageCreateInfo
::stencilUsage
.
If image
is a 3D image, its Z range can be restricted to a subset by
adding a
ImageViewSlicedCreateInfoEXT
to the pNext
chain.
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.
If image
was created with a
multi-planar
format, and the image view’s aspectMask
is one of
IMAGE_ASPECT_PLANE_0_BIT
,
IMAGE_ASPECT_PLANE_1_BIT
or
IMAGE_ASPECT_PLANE_2_BIT
, the
view’s aspect mask is considered to be equivalent to
IMAGE_ASPECT_COLOR_BIT
when
used as a framebuffer attachment.
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. 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.
The ComponentMapping
components
member describes a remapping from
components of the image to components of the vector returned by shader
image instructions. This remapping must be the identity swizzle for
storage image descriptors, input attachment descriptors, framebuffer
attachments, and any ImageView
used with a
combined image sampler that enables
sampler Y′CBCR conversion.
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
, subresourceRange.aspectMask
is
IMAGE_ASPECT_COLOR_BIT
, and
usage
includes
IMAGE_USAGE_SAMPLED_BIT
, then
the format
must be identical to the image format
and the sampler
to be used with the image view must enable
sampler Y′CBCR conversion.
When such an image is used in a video coding operation, the sampler Y′CBCR conversion has no effect.
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 components 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.
Image type and image view type compatibility requirements
Valid Usage
- If
image
was not created withIMAGE_CREATE_CUBE_COMPATIBLE_BIT
thenviewType
must not beIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
- If the
imageCubeArray
feature is not enabled,
viewType
must not beIMAGE_VIEW_TYPE_CUBE_ARRAY
- If
image
was created withIMAGE_TYPE_3D
but withoutIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
set thenviewType
must not beIMAGE_VIEW_TYPE_2D_ARRAY
- If
image
was created withIMAGE_TYPE_3D
but withoutIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
orIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
set, thenviewType
must not beIMAGE_VIEW_TYPE_2D
- If
image
was created withIMAGE_TYPE_3D
andviewType
isIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
thensubresourceRange.levelCount
must be 1 - If
image
was created withIMAGE_TYPE_3D
andviewType
isIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
thenImageCreateInfo
::flags
must not contain any ofIMAGE_CREATE_SPARSE_BINDING_BIT
,IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, andIMAGE_CREATE_SPARSE_ALIASED_BIT
- If
image
was created with asamples
value not equal toSAMPLE_COUNT_1_BIT
thenviewType
must be eitherIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
-
image
must have been created with ausage
value containing at least one of the usages defined in the valid image usage list for image views - The format features of the resultant image view must contain at least one bit
- If
usage
containsIMAGE_USAGE_SAMPLED_BIT
, then the format features of the resultant image view must containFORMAT_FEATURE_SAMPLED_IMAGE_BIT
- If
usage
containsIMAGE_USAGE_STORAGE_BIT
, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_BIT
- If
usage
containsIMAGE_USAGE_COLOR_ATTACHMENT_BIT
, then the image view’s format features must containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
orFORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
- If
usage
containsIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
, then the image view’s format features must containFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
If
usage
containsIMAGE_USAGE_INPUT_ATTACHMENT_BIT
, and any of the following is true:- the externalFormatResolve feature is not enabled
- the
nullColorAttachmentWithExternalFormatResolve
property is
FALSE
image
was created with anExternalFormatANDROID
::externalFormat
value of 0
then the image view’s format features must contain at least one of
FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
orFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
orFORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
-
subresourceRange.baseMipLevel
must be less than themipLevels
specified inImageCreateInfo
whenimage
was created - If
subresourceRange.levelCount
is notREMAINING_MIP_LEVELS
,subresourceRange.baseMipLevel
+subresourceRange.levelCount
must be less than or equal to themipLevels
specified inImageCreateInfo
whenimage
was created - If
image
was created withusage
containingIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
,subresourceRange.levelCount
must be1
- If
image
is not a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
orIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
set, orviewType
is notIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
,subresourceRange.baseArrayLayer
must be less than thearrayLayers
specified inImageCreateInfo
whenimage
was created - If
subresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
,image
is not a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
orIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
set, orviewType
is notIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
,subresourceRange.layerCount
must be non-zero andsubresourceRange.baseArrayLayer
+subresourceRange.layerCount
must be less than or equal to thearrayLayers
specified inImageCreateInfo
whenimage
was created - If
image
is a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
set, andviewType
isIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
,subresourceRange.baseArrayLayer
must be less than the depth computed frombaseMipLevel
andextent.depth
specified inImageCreateInfo
whenimage
was created, according to the formula defined in Image Mip Level Sizing - If
subresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
,image
is a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
set, andviewType
isIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
,subresourceRange.layerCount
must be non-zero andsubresourceRange.baseArrayLayer
+subresourceRange.layerCount
must be less than or equal to the depth computed frombaseMipLevel
andextent.depth
specified inImageCreateInfo
whenimage
was created, according to the formula defined in Image Mip Level Sizing - If
image
was created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag, but without theIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
flag, and if theformat
of theimage
is not a multi-planar format,format
must be compatible with theformat
used to createimage
, as defined in Format Compatibility Classes - If
image
was created with theIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
flag,format
must be compatible with, or must be an uncompressed format that is size-compatible with, theformat
used to createimage
- If
image
was created with theIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
flag andformat
is a non-compressed format, thelevelCount
andlayerCount
members ofsubresourceRange
must both be1
- If a
ImageFormatListCreateInfo
structure was included in thepNext
chain of theImageCreateInfo
structure used when creatingimage
andImageFormatListCreateInfo
::viewFormatCount
is not zero thenformat
must be one of the formats inImageFormatListCreateInfo
::pViewFormats
- If
image
was created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag, if theformat
of theimage
is a multi-planar format, and ifsubresourceRange.aspectMask
is one of the multi-planar aspect mask bits, thenformat
must be compatible with theFormat
for the plane of theimage
format
indicated bysubresourceRange.aspectMask
, as defined in https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#formats-compatible-planes -
subresourceRange.aspectMask
must only have at most 1 valid multi-planar aspect mask bit - If
image
was not created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag, or if theformat
of theimage
is a multi-planar format and ifsubresourceRange.aspectMask
isIMAGE_ASPECT_COLOR_BIT
,format
must be identical to theformat
used to createimage
- If the image view
requires a sampler Y′CBCR conversion
and
usage
containsIMAGE_USAGE_SAMPLED_BIT
, then thepNext
chain must include aSamplerYcbcrConversionInfo
structure with a conversion value other thanNULL_HANDLE
- If
format
has a_422
or_420
suffix thenimage
must have been created with a width that is a multiple of 2 - If
format
has a_420
suffix thenimage
must have been created with a height that is a multiple of 2 - If the
pNext
chain includes aSamplerYcbcrConversionInfo
structure with aconversion
value other thanNULL_HANDLE
, all members ofcomponents
must have the identity swizzle - If the
pNext
chain includes aSamplerYcbcrConversionInfo
structure with aconversion
value other thanNULL_HANDLE
,format
must be the same used inSamplerYcbcrConversionCreateInfo
::format
- If
image
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object -
viewType
must be compatible with the type ofimage
as shown in the view type compatibility table - If
image
has an Android external format,format
must beFORMAT_UNDEFINED
- If
image
has an Android external format, thepNext
chain must include aSamplerYcbcrConversionInfo
structure with aconversion
object created with the same external format asimage
- If
image
has an Android external format, all members ofcomponents
must be the identity swizzle - If
image
has an QNX Screen external format,format
must beFORMAT_UNDEFINED
- If
image
has an QNX Screen external format, thepNext
chain must include aSamplerYcbcrConversionInfo
structure with aconversion
object created with the same external format asimage
- If
image
has an QNX Screen external format, all members ofcomponents
must be the identity swizzle - If
image
was created withusage
containingIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
,viewType
must beIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If the
shadingRateImage
feature is enabled, and If
image
was created withusage
containingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,format
must beFORMAT_R8_UINT
- If the
attachmentFragmentShadingRate
feature is enabled, and the
usage
for the image view includesIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
, then the image view’s format features must containFORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
- If the
attachmentFragmentShadingRate
feature is enabled, the
usage
for the image view includesIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
, and layeredShadingRateAttachments isFALSE
,subresourceRange.layerCount
must be1
- If the
fragmentDensityMapDynamic
feature is not enabled,
flags
must not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
- If the
fragmentDensityMapDeferred
feature is not enabled,
flags
must not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
- If
flags
containsIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
,flags
must not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
- If
image
was created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
andusage
containingIMAGE_USAGE_SAMPLED_BIT
,subresourceRange.layerCount
must be less than or equal to ::maxSubsampledArrayLayers - If the
invocationMask
feature is enabled, and if
image
was created withusage
containingIMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI
,format
must beFORMAT_R8_UINT
- If
flags
does not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
andimage
was created withusage
containingIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
, itsflags
must not contain any ofIMAGE_CREATE_PROTECTED_BIT
,IMAGE_CREATE_SPARSE_BINDING_BIT
,IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, orIMAGE_CREATE_SPARSE_ALIASED_BIT
- If the
pNext
chain includes aImageViewUsageCreateInfo
structure, andimage
was not created with aImageStencilUsageCreateInfo
structure included in thepNext
chain ofImageCreateInfo
, itsusage
member must not include any bits that were not set in theusage
member of theImageCreateInfo
structure used to createimage
- If the
pNext
chain includes aImageViewUsageCreateInfo
structure,image
was created with aImageStencilUsageCreateInfo
structure included in thepNext
chain ofImageCreateInfo
, andsubresourceRange.aspectMask
includesIMAGE_ASPECT_STENCIL_BIT
, theusage
member of theImageViewUsageCreateInfo
structure must not include any bits that were not set in theusage
member of theImageStencilUsageCreateInfo
structure used to createimage
- If the
pNext
chain includes aImageViewUsageCreateInfo
structure,image
was created with aImageStencilUsageCreateInfo
structure included in thepNext
chain ofImageCreateInfo
, andsubresourceRange.aspectMask
includes bits other thanIMAGE_ASPECT_STENCIL_BIT
, theusage
member of theImageViewUsageCreateInfo
structure must not include any bits that were not set in theusage
member of theImageCreateInfo
structure used to createimage
- If
viewType
isIMAGE_VIEW_TYPE_1D
,IMAGE_VIEW_TYPE_2D
, orIMAGE_VIEW_TYPE_3D
; andsubresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
, thensubresourceRange.layerCount
must be 1 - If
viewType
isIMAGE_VIEW_TYPE_1D
,IMAGE_VIEW_TYPE_2D
, orIMAGE_VIEW_TYPE_3D
; andsubresourceRange.layerCount
isREMAINING_ARRAY_LAYERS
, then the remaining number of layers must be 1 - If
viewType
isIMAGE_VIEW_TYPE_CUBE
andsubresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
,subresourceRange.layerCount
must be6
- If
viewType
isIMAGE_VIEW_TYPE_CUBE_ARRAY
andsubresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
,subresourceRange.layerCount
must be a multiple of6
- If
viewType
isIMAGE_VIEW_TYPE_CUBE
andsubresourceRange.layerCount
isREMAINING_ARRAY_LAYERS
, the remaining number of layers must be6
- If
viewType
isIMAGE_VIEW_TYPE_CUBE_ARRAY
andsubresourceRange.layerCount
isREMAINING_ARRAY_LAYERS
, the remaining number of layers must be a multiple of6
- If the
VK_KHR_portability_subset
extension is enabled, andPhysicalDevicePortabilitySubsetFeaturesKHR
::imageViewFormatSwizzle
isFALSE
, all elements ofcomponents
must have the identity swizzle -
If the
VK_KHR_portability_subset
extension is enabled, andPhysicalDevicePortabilitySubsetFeaturesKHR
::imageViewFormatReinterpretation
isFALSE
, theFormat
informat
must not contain a different number of components, or a different number of bits in each component, than the format of theImage
inimage
- If
image
was created withusage
containingVK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
,VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR
, orVK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR
, then theviewType
must beIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If
image
was created withusage
containingVK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR
,VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR
, orVK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR
, then theviewType
must beIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If
flags
includesIMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
, the descriptorBufferCaptureReplay feature must be enabled - If the
pNext
chain includes aOpaqueCaptureDescriptorDataCreateInfoEXT
structure,flags
must containIMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
- If the
pNext
chain includes aExportMetalObjectCreateInfoEXT
structure, itsexportObjectType
member must beEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure, then textureSampleWeighted feature must be enabled - If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure, thenimage
must have been created withusage
containingIMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure, thencomponents
must beCOMPONENT_SWIZZLE_IDENTITY
for all components - If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure, thensubresourceRange.aspectMask
must beIMAGE_ASPECT_COLOR_BIT
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure, thensubresourceRange.levelCount
must be1
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure, thenviewType
must beIMAGE_VIEW_TYPE_1D_ARRAY
orIMAGE_VIEW_TYPE_2D_ARRAY
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure and ifviewType
isIMAGE_VIEW_TYPE_1D_ARRAY
, thenimage
must have been created withimageType
IMAGE_TYPE_1D
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_1D_ARRAY
, thensubresourceRange.layerCount
must be equal to2
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_1D_ARRAY
, thenimage
must have been created withwidth
equal to or greater than ((numPhases times mathbin{max}left( mathbin{align}left(filterSize.width,4right), filterSize.heightright))) - If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure and ifviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thenimage
must have been created withimageType
IMAGE_TYPE_2D
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thensubresourceRange.layerCount
must be equal or greater than numPhases - If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thenimage
must have been created withwidth
equal to or greater thanfilterSize.width
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thenimage
must have been created withheight
equal to or greater thanfilterSize.height
- If the
pNext
chain includesImageViewSampleWeightCreateInfoQCOM
structure thenImageViewSampleWeightCreateInfoQCOM
::filterSize.height
must be less than or equal to ::maxWeightFilterDimension.height
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofExportMetalObjectCreateInfoEXT
,ImageViewASTCDecodeModeEXT
,ImageViewMinLodCreateInfoEXT
,ImageViewSampleWeightCreateInfoQCOM
,ImageViewSlicedCreateInfoEXT
,ImageViewUsageCreateInfo
,OpaqueCaptureDescriptorDataCreateInfoEXT
, orSamplerYcbcrConversionInfo
- The
sType
value of each struct in thepNext
chain must be unique, with the exception of structures of typeExportMetalObjectCreateInfoEXT
-
flags
must be a valid combination ofImageViewCreateFlagBits
values -
image
must be a validImage
handle -
viewType
must be a validImageViewType
value -
format
must be a validFormat
value -
components
must be a validComponentMapping
structure -
subresourceRange
must be a validImageSubresourceRange
structure
See Also
VK_VERSION_1_0,
ComponentMapping
, Format
,
Image
, ImageSubresourceRange
,
ImageViewCreateFlags
,
ImageViewType
,
StructureType
, createImageView
ImageViewCreateInfo | |
|
Instances
VkImageView - Opaque handle to an image view object
See Also
VK_VERSION_1_0,
DescriptorImageInfo
,
ExportMetalTextureInfoEXT
,
FramebufferCreateInfo
,
ImageViewCaptureDescriptorDataInfoEXT
,
ImageViewHandleInfoNVX
,
RenderPassAttachmentBeginInfo
,
RenderingAttachmentInfo
,
RenderingFragmentDensityMapAttachmentInfoEXT
,
RenderingFragmentShadingRateAttachmentInfoKHR
,
VkVideoPictureResourceInfoKHR,
bindOpticalFlowSessionImageNV
,
cmdBindInvocationMaskHUAWEI
,
cmdBindShadingRateImageNV
,
createImageView
,
destroyImageView
,
getImageViewAddressNVX
Instances
Storable ImageView Source # | |
Defined in Vulkan.Core10.Handles | |
Show ImageView Source # | |
Eq ImageView Source # | |
Ord ImageView Source # | |
Defined in Vulkan.Core10.Handles | |
HasObjectType ImageView Source # | |
Defined in Vulkan.Core10.Handles objectTypeAndHandle :: ImageView -> (ObjectType, Word64) Source # | |
IsHandle ImageView Source # | |
Defined in Vulkan.Core10.Handles | |
Zero ImageView Source # | |
Defined in Vulkan.Core10.Handles |
newtype ImageViewType Source #
VkImageViewType - Image view types
See Also
VK_VERSION_1_0,
ImageViewCreateInfo
,
PhysicalDeviceImageViewImageFormatInfoEXT
pattern IMAGE_VIEW_TYPE_1D :: ImageViewType | |
pattern IMAGE_VIEW_TYPE_2D :: ImageViewType | |
pattern IMAGE_VIEW_TYPE_3D :: ImageViewType | |
pattern IMAGE_VIEW_TYPE_CUBE :: ImageViewType | |
pattern IMAGE_VIEW_TYPE_1D_ARRAY :: ImageViewType | |
pattern IMAGE_VIEW_TYPE_2D_ARRAY :: ImageViewType | |
pattern IMAGE_VIEW_TYPE_CUBE_ARRAY :: ImageViewType |
Instances
newtype ComponentSwizzle Source #
VkComponentSwizzle - Specify how a component is swizzled
Description
Setting the identity swizzle on a component is equivalent to setting the identity mapping on that component. That is:
Component | Identity Mapping |
---|---|
components.r | COMPONENT_SWIZZLE_R |
components.g | COMPONENT_SWIZZLE_G |
components.b | COMPONENT_SWIZZLE_B |
components.a | COMPONENT_SWIZZLE_A |
Component Mappings Equivalent To COMPONENT_SWIZZLE_IDENTITY
See Also
pattern COMPONENT_SWIZZLE_IDENTITY :: ComponentSwizzle |
|
pattern COMPONENT_SWIZZLE_ZERO :: ComponentSwizzle |
|
pattern COMPONENT_SWIZZLE_ONE :: ComponentSwizzle |
|
pattern COMPONENT_SWIZZLE_R :: ComponentSwizzle |
|
pattern COMPONENT_SWIZZLE_G :: ComponentSwizzle |
|
pattern COMPONENT_SWIZZLE_B :: ComponentSwizzle |
|
pattern COMPONENT_SWIZZLE_A :: ComponentSwizzle |
|
Instances
newtype ImageViewCreateFlagBits Source #
VkImageViewCreateFlagBits - Bitmask specifying additional parameters of an image view
See Also
pattern IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT :: ImageViewCreateFlagBits |
|
pattern IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: ImageViewCreateFlagBits |
|
pattern IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT :: ImageViewCreateFlagBits |
|