Class VkImageViewCreateInfo
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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. The implicit usage
can be overridden by adding a VkImageViewUsageCreateInfo
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 VkImageStencilUsageCreateInfo
structure included in the pNext
chain of VkImageCreateInfo
, the usage is calculated based on the subresource.aspectMask
provided:
- If
aspectMask
includes onlyIMAGE_ASPECT_STENCIL_BIT
, the implicitusage
is equal toVkImageStencilUsageCreateInfo
::stencilUsage
. - If
aspectMask
includes onlyIMAGE_ASPECT_DEPTH_BIT
, the implicitusage
is equal toVkImageCreateInfo
::usage
. - If both aspects are included in
aspectMask
, the implicitusage
is equal to the intersection ofVkImageCreateInfo
::usage
andVkImageStencilUsageCreateInfo
::stencilUsage
.
If image
is a 3D image, its Z range can be restricted to a subset by adding a VkImageViewSlicedCreateInfoEXT
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 VkComponentMapping
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 VkImageView
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 VkSamplerYcbcrConversion
to that used to create the sampler must be passed to CreateImageView
in a VkSamplerYcbcrConversionInfo
included in the pNext
chain of VkImageViewCreateInfo
. Conversely, if a VkSamplerYcbcrConversion
object is passed to CreateImageView
, an identically defined VkSamplerYcbcrConversion
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
thenVkImageCreateInfo
::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 isFALSE
image
was created with anVkExternalFormatANDROID
::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
- the
subresourceRange.baseMipLevel
must be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created- If
subresourceRange.levelCount
is notREMAINING_MIP_LEVELS
,subresourceRange.baseMipLevel + subresourceRange.levelCount
must be less than or equal to themipLevels
specified inVkImageCreateInfo
whenimage
was created - If
image
was created withusage
containingIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
,subresourceRange.levelCount
must be 1 - 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 inVkImageCreateInfo
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 inVkImageCreateInfo
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 inVkImageCreateInfo
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 inVkImageCreateInfo
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 be 1 - If a
VkImageFormatListCreateInfo
structure was included in thepNext
chain of theVkImageCreateInfo
structure used when creatingimage
andVkImageFormatListCreateInfo
::viewFormatCount
is not zero thenformat
must be one of the formats inVkImageFormatListCreateInfo
::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 theVkFormat
for the plane of theimage
format
indicated bysubresourceRange.aspectMask
, as defined in Compatible formats of planes of multi-planar formats 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 aVkSamplerYcbcrConversionInfo
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 aVkSamplerYcbcrConversionInfo
structure with aconversion
value other thanNULL_HANDLE
, all members ofcomponents
must have the identity swizzle - If the
pNext
chain includes aVkSamplerYcbcrConversionInfo
structure with aconversion
value other thanNULL_HANDLE
,format
must be the same used inVkSamplerYcbcrConversionCreateInfo
::format
- If
image
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
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 aVkSamplerYcbcrConversionInfo
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
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 Ifimage
was created withusage
containingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,format
must beFORMAT_R8_UINT
- If the
attachmentFragmentShadingRate
feature is enabled, and theusage
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, theusage
for the image view includesIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
, andlayeredShadingRateAttachments
isFALSE
,subresourceRange.layerCount
must be 1 - 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 toVkPhysicalDeviceFragmentDensityMap2PropertiesEXT
::maxSubsampledArrayLayers
- If the
invocationMask
feature is enabled, and ifimage
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 aVkImageViewUsageCreateInfo
structure, andimage
was not created with aVkImageStencilUsageCreateInfo
structure included in thepNext
chain ofVkImageCreateInfo
, itsusage
member must not include any bits that were not set in theusage
member of theVkImageCreateInfo
structure used to createimage
- If the
pNext
chain includes aVkImageViewUsageCreateInfo
structure,image
was created with aVkImageStencilUsageCreateInfo
structure included in thepNext
chain ofVkImageCreateInfo
, andsubresourceRange.aspectMask
includesIMAGE_ASPECT_STENCIL_BIT
, theusage
member of theVkImageViewUsageCreateInfo
structure must not include any bits that were not set in theusage
member of theVkImageStencilUsageCreateInfo
structure used to createimage
- If the
pNext
chain includes aVkImageViewUsageCreateInfo
structure,image
was created with aVkImageStencilUsageCreateInfo
structure included in thepNext
chain ofVkImageCreateInfo
, andsubresourceRange.aspectMask
includes bits other thanIMAGE_ASPECT_STENCIL_BIT
, theusage
member of theVkImageViewUsageCreateInfo
structure must not include any bits that were not set in theusage
member of theVkImageCreateInfo
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 be 6 - If
viewType
isIMAGE_VIEW_TYPE_CUBE_ARRAY
andsubresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
,subresourceRange.layerCount
must be a multiple of 6 - If
viewType
isIMAGE_VIEW_TYPE_CUBE
andsubresourceRange.layerCount
isREMAINING_ARRAY_LAYERS
, the remaining number of layers must be 6 - If
viewType
isIMAGE_VIEW_TYPE_CUBE_ARRAY
andsubresourceRange.layerCount
isREMAINING_ARRAY_LAYERS
, the remaining number of layers must be a multiple of 6 - If the
VK_KHR_portability_subset
extension is enabled, andVkPhysicalDevicePortabilitySubsetFeaturesKHR
::imageViewFormatSwizzle
isFALSE
, all elements ofcomponents
must have the identity swizzle - If the
VK_KHR_portability_subset
extension is enabled, andVkPhysicalDevicePortabilitySubsetFeaturesKHR
::imageViewFormatReinterpretation
isFALSE
, theVkFormat
informat
must not contain a different number of components, or a different number of bits in each component, than the format of theVkImage
inimage
- If
image
was created withusage
containingIMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
,IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR
, orIMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR
, then theviewType
must beIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If
image
was created withusage
containingIMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR
,IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR
, orIMAGE_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
, thedescriptorBufferCaptureReplay
feature must be enabled - If the
pNext
chain includes aVkOpaqueCaptureDescriptorDataCreateInfoEXT
structure,flags
must containIMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
- If the
pNext
chain includes aVkExportMetalObjectCreateInfoEXT
structure, itsexportObjectType
member must beEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure, thentextureSampleWeighted
feature must be enabled - If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure, thenimage
must have been created withusage
containingIMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure, thencomponents
must beCOMPONENT_SWIZZLE_IDENTITY
for all components - If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure, thensubresourceRange.aspectMask
must beIMAGE_ASPECT_COLOR_BIT
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure, thensubresourceRange.levelCount
must be 1 - If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure, thenviewType
must beIMAGE_VIEW_TYPE_1D_ARRAY
orIMAGE_VIEW_TYPE_2D_ARRAY
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure and ifviewType
isIMAGE_VIEW_TYPE_1D_ARRAY
, thenimage
must have been created withimageType
IMAGE_TYPE_1D
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_1D_ARRAY
, thensubresourceRange.layerCount
must be equal to 2 - If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_1D_ARRAY
, thenimage
must have been created withwidth
equal to or greater than(numPhases × max(align(filterSize.width, 4), filterSize.height))
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure and ifviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thenimage
must have been created withimageType
IMAGE_TYPE_2D
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thensubresourceRange.layerCount
must be equal or greater thannumPhases
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thenimage
must have been created withwidth
equal to or greater thanfilterSize.width
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure andviewType
isIMAGE_VIEW_TYPE_2D_ARRAY
, thenimage
must have been created withheight
equal to or greater thanfilterSize.height
- If the
pNext
chain includesVkImageViewSampleWeightCreateInfoQCOM
structure thenVkImageViewSampleWeightCreateInfoQCOM
::filterSize.height
must be less than or equal toVkPhysicalDeviceImageProcessingPropertiesQCOM
::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 ofVkExportMetalObjectCreateInfoEXT
,VkImageViewASTCDecodeModeEXT
,VkImageViewMinLodCreateInfoEXT
,VkImageViewSampleWeightCreateInfoQCOM
,VkImageViewSlicedCreateInfoEXT
,VkImageViewUsageCreateInfo
,VkOpaqueCaptureDescriptorDataCreateInfoEXT
, orVkSamplerYcbcrConversionInfo
- The
sType
value of each struct in thepNext
chain must be unique, with the exception of structures of typeVkExportMetalObjectCreateInfoEXT
flags
must be a valid combination ofVkImageViewCreateFlagBits
valuesimage
must be a validVkImage
handleviewType
must be a validVkImageViewType
valueformat
must be a validVkFormat
valuecomponents
must be a validVkComponentMapping
structuresubresourceRange
must be a validVkImageSubresourceRange
structure
See Also
VkComponentMapping
, VkImageSubresourceRange
, CreateImageView
Layout
struct VkImageViewCreateInfo {
VkStructureType sType()
;
void const * pNext()
;
VkImageViewCreateFlags flags()
;
VkImage image()
;
VkImageViewType viewType()
;
VkFormat format()
;
VkComponentMapping
components()
;
VkImageSubresourceRange
subresourceRange()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkImageViewCreateInfo
(ByteBuffer container) Creates aVkImageViewCreateInfo
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkImageViewCreateInfo
calloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemCalloc
.static VkImageViewCreateInfo.Buffer
calloc
(int capacity) Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemCalloc
.static VkImageViewCreateInfo.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo
calloc
(MemoryStack stack) Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo
Deprecated.static VkImageViewCreateInfo.Buffer
callocStack
(int capacity) Deprecated.static VkImageViewCreateInfo.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkImageViewCreateInfo
callocStack
(MemoryStack stack) Deprecated.aVkComponentMapping
structure specifying a remapping of color components (or of depth or stencil components after they have been converted into color components).components
(Consumer<VkComponentMapping> consumer) Passes thecomponents()
field to the specifiedConsumer
.components
(VkComponentMapping value) Copies the specifiedVkComponentMapping
to thecomponents()
field.static VkImageViewCreateInfo
create()
Returns a newVkImageViewCreateInfo
instance allocated withBufferUtils
.static VkImageViewCreateInfo.Buffer
create
(int capacity) Returns a newVkImageViewCreateInfo.Buffer
instance allocated withBufferUtils
.static VkImageViewCreateInfo
create
(long address) Returns a newVkImageViewCreateInfo
instance for the specified memory address.static VkImageViewCreateInfo.Buffer
create
(long address, int capacity) Create aVkImageViewCreateInfo.Buffer
instance at the specified memory.static VkImageViewCreateInfo
createSafe
(long address) static VkImageViewCreateInfo.Buffer
createSafe
(long address, int capacity) int
flags()
a bitmask ofVkImageViewCreateFlagBits
specifying additional parameters of the image view.flags
(int value) Sets the specified value to theflags()
field.int
format()
aVkFormat
specifying the format and type used to interpret texel blocks of the image.format
(int value) Sets the specified value to theformat()
field.long
image()
aVkImage
on which the view will be created.image
(long value) Sets the specified value to theimage()
field.static VkImageViewCreateInfo
malloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemAlloc
.static VkImageViewCreateInfo.Buffer
malloc
(int capacity) Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemAlloc
.static VkImageViewCreateInfo.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageViewCreateInfo
malloc
(MemoryStack stack) Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
.static VkImageViewCreateInfo
Deprecated.static VkImageViewCreateInfo.Buffer
mallocStack
(int capacity) Deprecated.static VkImageViewCreateInfo.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkImageViewCreateInfo
mallocStack
(MemoryStack stack) Deprecated.static VkComponentMapping
ncomponents
(long struct) Unsafe version ofcomponents()
.static void
ncomponents
(long struct, VkComponentMapping value) Unsafe version ofcomponents
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static int
nformat
(long struct) Unsafe version offormat()
.static void
nformat
(long struct, int value) Unsafe version offormat
.static long
nimage
(long struct) Unsafe version ofimage()
.static void
nimage
(long struct, long value) Unsafe version ofimage
.static long
npNext
(long struct) Unsafe version ofpNext()
.static void
npNext
(long struct, long value) Unsafe version ofpNext
.static int
nsType
(long struct) Unsafe version ofsType()
.static void
nsType
(long struct, int value) Unsafe version ofsType
.static VkImageSubresourceRange
nsubresourceRange
(long struct) Unsafe version ofsubresourceRange()
.static void
nsubresourceRange
(long struct, VkImageSubresourceRange value) Unsafe version ofsubresourceRange
.static int
nviewType
(long struct) Unsafe version ofviewType()
.static void
nviewType
(long struct, int value) Unsafe version ofviewType
.long
pNext()
NULL
or a pointer to a structure extending this structure.pNext
(long value) Sets the specified value to thepNext()
field.Prepends the specifiedVkExportMetalObjectCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkImageViewASTCDecodeModeEXT
value to thepNext
chain.Prepends the specifiedVkImageViewMinLodCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkImageViewSampleWeightCreateInfoQCOM
value to thepNext
chain.Prepends the specifiedVkImageViewSlicedCreateInfoEXT
value to thepNext
chain.pNext
(VkImageViewUsageCreateInfo value) Prepends the specifiedVkImageViewUsageCreateInfo
value to thepNext
chain.Prepends the specifiedVkImageViewUsageCreateInfoKHR
value to thepNext
chain.Prepends the specifiedVkOpaqueCaptureDescriptorDataCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkSamplerYcbcrConversionInfo
value to thepNext
chain.Prepends the specifiedVkSamplerYcbcrConversionInfoKHR
value to thepNext
chain.set
(int sType, long pNext, int flags, long image, int viewType, int format, VkComponentMapping components, VkImageSubresourceRange subresourceRange) Initializes this struct with the specified values.set
(VkImageViewCreateInfo src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
sType()
aVkStructureType
value identifying this structure.sType
(int value) Sets the specified value to thesType()
field.Sets theSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
value to thesType()
field.aVkImageSubresourceRange
structure selecting the set of mipmap levels and array layers to be accessible to the view.subresourceRange
(Consumer<VkImageSubresourceRange> consumer) Passes thesubresourceRange()
field to the specifiedConsumer
.Copies the specifiedVkImageSubresourceRange
to thesubresourceRange()
field.int
viewType()
aVkImageViewType
value specifying the type of the image view.viewType
(int value) Sets the specified value to theviewType()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
IMAGE
public static final int IMAGEThe struct member offsets. -
VIEWTYPE
public static final int VIEWTYPEThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets. -
COMPONENTS
public static final int COMPONENTSThe struct member offsets. -
SUBRESOURCERANGE
public static final int SUBRESOURCERANGEThe struct member offsets.
-
-
Constructor Details
-
VkImageViewCreateInfo
Creates aVkImageViewCreateInfo
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkImageViewCreateInfo>
-
sType
public int sType()aVkStructureType
value identifying this structure. -
pNext
public long pNext()NULL
or a pointer to a structure extending this structure. -
flags
public int flags()a bitmask ofVkImageViewCreateFlagBits
specifying additional parameters of the image view. -
image
public long image()aVkImage
on which the view will be created. -
viewType
public int viewType()aVkImageViewType
value specifying the type of the image view. -
format
public int format()aVkFormat
specifying the format and type used to interpret texel blocks of the image. -
components
aVkComponentMapping
structure specifying a remapping of color components (or of depth or stencil components after they have been converted into color components). -
subresourceRange
aVkImageSubresourceRange
structure selecting the set of mipmap levels and array layers to be accessible to the view. -
sType
Sets the specified value to thesType()
field. -
sType$Default
Sets theSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
value to thesType()
field. -
pNext
Sets the specified value to thepNext()
field. -
pNext
Prepends the specifiedVkExportMetalObjectCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageViewASTCDecodeModeEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageViewMinLodCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageViewSampleWeightCreateInfoQCOM
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageViewSlicedCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageViewUsageCreateInfo
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageViewUsageCreateInfoKHR
value to thepNext
chain. -
pNext
Prepends the specifiedVkOpaqueCaptureDescriptorDataCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkSamplerYcbcrConversionInfo
value to thepNext
chain. -
pNext
Prepends the specifiedVkSamplerYcbcrConversionInfoKHR
value to thepNext
chain. -
flags
Sets the specified value to theflags()
field. -
image
Sets the specified value to theimage()
field. -
viewType
Sets the specified value to theviewType()
field. -
format
Sets the specified value to theformat()
field. -
components
Copies the specifiedVkComponentMapping
to thecomponents()
field. -
components
Passes thecomponents()
field to the specifiedConsumer
. -
subresourceRange
Copies the specifiedVkImageSubresourceRange
to thesubresourceRange()
field. -
subresourceRange
Passes thesubresourceRange()
field to the specifiedConsumer
. -
set
public VkImageViewCreateInfo set(int sType, long pNext, int flags, long image, int viewType, int format, VkComponentMapping components, VkImageSubresourceRange subresourceRange) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkImageViewCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkImageViewCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkImageViewCreateInfo
instance allocated withBufferUtils
. -
create
Returns a newVkImageViewCreateInfo
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkImageViewCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType()
. -
npNext
public static long npNext(long struct) Unsafe version ofpNext()
. -
nflags
public static int nflags(long struct) Unsafe version offlags()
. -
nimage
public static long nimage(long struct) Unsafe version ofimage()
. -
nviewType
public static int nviewType(long struct) Unsafe version ofviewType()
. -
nformat
public static int nformat(long struct) Unsafe version offormat()
. -
ncomponents
Unsafe version ofcomponents()
. -
nsubresourceRange
Unsafe version ofsubresourceRange()
. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType
. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext
. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags
. -
nimage
public static void nimage(long struct, long value) Unsafe version ofimage
. -
nviewType
public static void nviewType(long struct, int value) Unsafe version ofviewType
. -
nformat
public static void nformat(long struct, int value) Unsafe version offormat
. -
ncomponents
Unsafe version ofcomponents
. -
nsubresourceRange
Unsafe version ofsubresourceRange
.
-