Class VkImageViewCreateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.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
aspectMaskincludes onlyIMAGE_ASPECT_STENCIL_BIT, the implicitusageis equal toVkImageStencilUsageCreateInfo::stencilUsage. - If
aspectMaskincludes onlyIMAGE_ASPECT_DEPTH_BIT, the implicitusageis equal toVkImageCreateInfo::usage. - If both aspects are included in
aspectMask, the implicitusageis equal to the intersection ofVkImageCreateInfo::usageandVkImageStencilUsageCreateInfo::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
imagewas not created withIMAGE_CREATE_CUBE_COMPATIBLE_BITthenviewTypemust not beIMAGE_VIEW_TYPE_CUBEorIMAGE_VIEW_TYPE_CUBE_ARRAY - If the
imageCubeArrayfeature is not enabled,viewTypemust not beIMAGE_VIEW_TYPE_CUBE_ARRAY - If
imagewas created withIMAGE_TYPE_3Dbut withoutIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset thenviewTypemust not beIMAGE_VIEW_TYPE_2D_ARRAY - If
imagewas created withIMAGE_TYPE_3Dbut withoutIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITorIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXTset, thenviewTypemust not beIMAGE_VIEW_TYPE_2D - If
imagewas created withIMAGE_TYPE_3DandviewTypeisIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAYthensubresourceRange.levelCountmust be 1 - If
imagewas created with asamplesvalue not equal toSAMPLE_COUNT_1_BITthenviewTypemust be eitherIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY imagemust have been created with ausagevalue 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
usagecontainsIMAGE_USAGE_SAMPLED_BIT, then the format features of the resultant image view must containFORMAT_FEATURE_SAMPLED_IMAGE_BIT - If
usagecontainsIMAGE_USAGE_STORAGE_BIT, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_BIT - If
usagecontainsIMAGE_USAGE_COLOR_ATTACHMENT_BIT, then the image view’s format features must containFORMAT_FEATURE_COLOR_ATTACHMENT_BITorFORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV - If
usagecontainsIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, then the image view’s format features must containFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT - If
imagewas created withIMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHRandusagecontainsIMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, then the image view’s format features must containFORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR - If
imagewas created withIMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHRandusagecontainsIMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the image view’s format features must containFORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR - If
imagewas created withIMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, thenusagemust not includeIMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR - If
imagewas created withIMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHRandusagecontainsIMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, then the image view’s format features must containFORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR - If
imagewas created withIMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHRandusagecontainsIMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the image view’s format features must containFORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR - If
imagewas created withIMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, thenusagemust not includeIMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR - If
usagecontainsIMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then the image view’s format features must containFORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR - If
usagecontainsIMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, then the image view’s format features must containFORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR - If
usagecontainsIMAGE_USAGE_INPUT_ATTACHMENT_BIT, and any of the following is true:- the
externalFormatResolvefeature is not enabled - the
nullColorAttachmentWithExternalFormatResolveproperty isFALSE imagewas created with anVkExternalFormatANDROID::externalFormatvalue of 0
then the image view’s format features must contain at least one of
FORMAT_FEATURE_COLOR_ATTACHMENT_BITorFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITorFORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV - the
subresourceRange.baseMipLevelmust be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created- If
subresourceRange.levelCountis notREMAINING_MIP_LEVELS,subresourceRange.baseMipLevel + subresourceRange.levelCountmust be less than or equal to themipLevelsspecified inVkImageCreateInfowhenimagewas created - If
imagewas created withusagecontainingIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,subresourceRange.levelCountmust be 1 - If
imageis not a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITorIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXTset, orviewTypeis notIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange.baseArrayLayermust be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created - If
subresourceRange.layerCountis notREMAINING_ARRAY_LAYERS,imageis not a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITorIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXTset, orviewTypeis notIMAGE_VIEW_TYPE_2DorIMAGE_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 withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset, andviewTypeisIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange.baseArrayLayermust be less than the depth computed frombaseMipLevelandextent.depthspecified inVkImageCreateInfowhenimagewas created, according to the formula defined in Image Mip Level Sizing - If
subresourceRange.layerCountis notREMAINING_ARRAY_LAYERS,imageis a 3D image created withIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITset, andviewTypeisIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY,subresourceRange.layerCountmust be non-zero andsubresourceRange.baseArrayLayer + subresourceRange.layerCountmust be less than or equal to the depth computed frombaseMipLevelandextent.depthspecified inVkImageCreateInfowhenimagewas created, according to the formula defined in Image Mip Level Sizing - If
imagewas created with theIMAGE_CREATE_MUTABLE_FORMAT_BITflag, but without theIMAGE_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 theIMAGE_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 theIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BITflag andformatis a non-compressed format, thelevelCountmember ofsubresourceRangemust be 1 - If
imagewas created with theIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BITflag, theVkPhysicalDeviceMaintenance6Properties::blockTexelViewCompatibleMultipleLayersproperty is notTRUE, andformatis a non-compressed format, then thelayerCountmember ofsubresourceRangemust be 1 - If a
VkImageFormatListCreateInfostructure was included in thepNextchain of theVkImageCreateInfostructure used when creatingimageandVkImageFormatListCreateInfo::viewFormatCountis not zero thenformatmust be one of the formats inVkImageFormatListCreateInfo::pViewFormats - If
imagewas created with theIMAGE_CREATE_MUTABLE_FORMAT_BITflag, if theformatof theimageis a multi-planar format, and ifsubresourceRange.aspectMaskis one of the multi-planar aspect mask bits, thenformatmust be compatible with theVkFormatfor the plane of theimageformatindicated bysubresourceRange.aspectMask, as defined in Compatible formats of planes of multi-planar formats subresourceRange.aspectMaskmust only have at most 1 valid multi-planar aspect mask bit- If
imagewas not created with theIMAGE_CREATE_MUTABLE_FORMAT_BITflag, or if theformatof theimageis a multi-planar format and ifsubresourceRange.aspectMaskisIMAGE_ASPECT_COLOR_BIT,formatmust be identical to theformatused to createimage - If the image view requires a sampler Y′CBCR conversion and
usagecontainsIMAGE_USAGE_SAMPLED_BIT, then thepNextchain must include aVkSamplerYcbcrConversionInfostructure with a conversion value other thanNULL_HANDLE - If
formathas a_422or_420suffix thenimagemust have been created with a width that is a multiple of 2 - If
formathas a_420suffix thenimagemust have been created with a height that is a multiple of 2 - If the
pNextchain includes aVkSamplerYcbcrConversionInfostructure with aconversionvalue other thanNULL_HANDLE, all members ofcomponentsmust have the identity swizzle - If the
pNextchain includes aVkSamplerYcbcrConversionInfostructure with aconversionvalue other thanNULL_HANDLE,formatmust be the same used inVkSamplerYcbcrConversionCreateInfo::format - If
imageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject viewTypemust be compatible with the type ofimageas shown in the view type compatibility table- If
imagehas an Android external format,formatmust beFORMAT_UNDEFINED - If
imagehas an Android external format, thepNextchain must include aVkSamplerYcbcrConversionInfostructure with aconversionobject created with the same external format asimage - If
imagehas an Android external format, all members ofcomponentsmust be the identity swizzle - If
imagewas created withusagecontainingIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,viewTypemust beIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY - If the
shadingRateImagefeature is enabled, and Ifimagewas created withusagecontainingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,formatmust beFORMAT_R8_UINT - If the
attachmentFragmentShadingRatefeature is enabled, and theusagefor 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
attachmentFragmentShadingRatefeature is enabled, theusagefor the image view includesIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, andlayeredShadingRateAttachmentsisFALSE,subresourceRange.layerCountmust be 1 - If the
fragmentDensityMapDynamicfeature is not enabled,flagsmust not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT - If the
fragmentDensityMapDeferredfeature is not enabled,flagsmust not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT - If
flagscontainsIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT,flagsmust not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT - If
imagewas created withflagscontainingIMAGE_CREATE_SUBSAMPLED_BIT_EXTandusagecontainingIMAGE_USAGE_SAMPLED_BIT,subresourceRange.layerCountmust be less than or equal toVkPhysicalDeviceFragmentDensityMap2PropertiesEXT::maxSubsampledArrayLayers - If the
invocationMaskfeature is enabled, and ifimagewas created withusagecontainingIMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI,formatmust beFORMAT_R8_UINT - If
flagsdoes not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXTandimagewas created withusagecontainingIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, itsflagsmust not contain any ofIMAGE_CREATE_PROTECTED_BIT,IMAGE_CREATE_SPARSE_BINDING_BIT,IMAGE_CREATE_SPARSE_RESIDENCY_BIT, orIMAGE_CREATE_SPARSE_ALIASED_BIT - If the
pNextchain includes aVkImageViewUsageCreateInfostructure, andimagewas not created with aVkImageStencilUsageCreateInfostructure included in thepNextchain ofVkImageCreateInfo, itsusagemember must not include any bits that were not set in theusagemember of theVkImageCreateInfostructure used to createimage - If the
pNextchain includes aVkImageViewUsageCreateInfostructure,imagewas created with aVkImageStencilUsageCreateInfostructure included in thepNextchain ofVkImageCreateInfo, andsubresourceRange.aspectMaskincludesIMAGE_ASPECT_STENCIL_BIT, theusagemember of theVkImageViewUsageCreateInfostructure must not include any bits that were not set in theusagemember of theVkImageStencilUsageCreateInfostructure used to createimage - If the
pNextchain includes aVkImageViewUsageCreateInfostructure,imagewas created with aVkImageStencilUsageCreateInfostructure included in thepNextchain ofVkImageCreateInfo, andsubresourceRange.aspectMaskincludes bits other thanIMAGE_ASPECT_STENCIL_BIT, theusagemember of theVkImageViewUsageCreateInfostructure must not include any bits that were not set in theusagemember of theVkImageCreateInfostructure used to createimage - If
viewTypeisIMAGE_VIEW_TYPE_1D,IMAGE_VIEW_TYPE_2D, orIMAGE_VIEW_TYPE_3D; andsubresourceRange.layerCountis notREMAINING_ARRAY_LAYERS, thensubresourceRange.layerCountmust be 1 - If
viewTypeisIMAGE_VIEW_TYPE_1D,IMAGE_VIEW_TYPE_2D, orIMAGE_VIEW_TYPE_3D; andsubresourceRange.layerCountisREMAINING_ARRAY_LAYERS, then the remaining number of layers must be 1 - If
viewTypeisIMAGE_VIEW_TYPE_CUBEandsubresourceRange.layerCountis notREMAINING_ARRAY_LAYERS,subresourceRange.layerCountmust be 6 - If
viewTypeisIMAGE_VIEW_TYPE_CUBE_ARRAYandsubresourceRange.layerCountis notREMAINING_ARRAY_LAYERS,subresourceRange.layerCountmust be a multiple of 6 - If
viewTypeisIMAGE_VIEW_TYPE_CUBEandsubresourceRange.layerCountisREMAINING_ARRAY_LAYERS, the remaining number of layers must be 6 - If
viewTypeisIMAGE_VIEW_TYPE_CUBE_ARRAYandsubresourceRange.layerCountisREMAINING_ARRAY_LAYERS, the remaining number of layers must be a multiple of 6 - If the
VK_KHR_portability_subsetextension is enabled, andVkPhysicalDevicePortabilitySubsetFeaturesKHR::imageViewFormatSwizzleisFALSE, all elements ofcomponentsmust have the identity swizzle - If the
VK_KHR_portability_subsetextension is enabled, andVkPhysicalDevicePortabilitySubsetFeaturesKHR::imageViewFormatReinterpretationisFALSE, theVkFormatinformatmust not contain a different number of components, or a different number of bits in each component, than the format of theVkImageinimage - If
imagewas created withusagecontainingIMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR,IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, orIMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then theviewTypemust beIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY - If
imagewas created withusagecontainingIMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR,IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, orIMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then theviewTypemust beIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY - If
imagewas created withusagecontainingIMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHRorIMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR, thenviewTypemust beIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY - If
flagsincludesIMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, thedescriptorBufferCaptureReplayfeature must be enabled - If the
pNextchain includes aVkOpaqueCaptureDescriptorDataCreateInfoEXTstructure,flagsmust containIMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT - If the
pNextchain includes aVkExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must beEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure, thentextureSampleWeightedfeature must be enabled - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure, thenimagemust have been created withusagecontainingIMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure, thencomponentsmust beCOMPONENT_SWIZZLE_IDENTITYfor all components - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure, thensubresourceRange.aspectMaskmust beIMAGE_ASPECT_COLOR_BIT - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure, thensubresourceRange.levelCountmust be 1 - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure, thenviewTypemust beIMAGE_VIEW_TYPE_1D_ARRAYorIMAGE_VIEW_TYPE_2D_ARRAY - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure and ifviewTypeisIMAGE_VIEW_TYPE_1D_ARRAY, thenimagemust have been created withimageTypeIMAGE_TYPE_1D - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure andviewTypeisIMAGE_VIEW_TYPE_1D_ARRAY, thensubresourceRange.layerCountmust be equal to 2 - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure andviewTypeisIMAGE_VIEW_TYPE_1D_ARRAY, thenimagemust have been created withwidthequal to or greater than(numPhases × max(align(filterSize.width, 4), filterSize.height)) - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure and ifviewTypeisIMAGE_VIEW_TYPE_2D_ARRAY, thenimagemust have been created withimageTypeIMAGE_TYPE_2D - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure andviewTypeisIMAGE_VIEW_TYPE_2D_ARRAY, thensubresourceRange.layerCountmust be equal or greater thannumPhases - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure andviewTypeisIMAGE_VIEW_TYPE_2D_ARRAY, thenimagemust have been created withwidthequal to or greater thanfilterSize.width - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure andviewTypeisIMAGE_VIEW_TYPE_2D_ARRAY, thenimagemust have been created withheightequal to or greater thanfilterSize.height - If the
pNextchain includesVkImageViewSampleWeightCreateInfoQCOMstructure thenVkImageViewSampleWeightCreateInfoQCOM::filterSize.heightmust be less than or equal toVkPhysicalDeviceImageProcessingPropertiesQCOM::maxWeightFilterDimension.height subresourceRange.aspectMaskmust be valid for theformattheimagewas created with
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkExportMetalObjectCreateInfoEXT,VkImageViewASTCDecodeModeEXT,VkImageViewMinLodCreateInfoEXT,VkImageViewSampleWeightCreateInfoQCOM,VkImageViewSlicedCreateInfoEXT,VkImageViewUsageCreateInfo,VkOpaqueCaptureDescriptorDataCreateInfoEXT, orVkSamplerYcbcrConversionInfo - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeVkExportMetalObjectCreateInfoEXT flagsmust be a valid combination ofVkImageViewCreateFlagBitsvaluesimagemust be a validVkImagehandleviewTypemust be a validVkImageViewTypevalueformatmust be a validVkFormatvaluecomponentsmust be a validVkComponentMappingstructuresubresourceRangemust be a validVkImageSubresourceRangestructure
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkImageViewCreateInfo(ByteBuffer container) Creates aVkImageViewCreateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkImageViewCreateInfocalloc()Returns a newVkImageViewCreateInfoinstance allocated withmemCalloc.static VkImageViewCreateInfo.Buffercalloc(int capacity) Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemCalloc.static VkImageViewCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageViewCreateInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageViewCreateInfoDeprecated.static VkImageViewCreateInfo.BuffercallocStack(int capacity) Deprecated.static VkImageViewCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkImageViewCreateInfocallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.aVkComponentMappingstructure 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 specifiedVkComponentMappingto thecomponents()field.static VkImageViewCreateInfocreate()Returns a newVkImageViewCreateInfoinstance allocated withBufferUtils.static VkImageViewCreateInfo.Buffercreate(int capacity) Returns a newVkImageViewCreateInfo.Bufferinstance allocated withBufferUtils.static VkImageViewCreateInfocreate(long address) Returns a newVkImageViewCreateInfoinstance for the specified memory address.static VkImageViewCreateInfo.Buffercreate(long address, int capacity) Create aVkImageViewCreateInfo.Bufferinstance at the specified memory.static @Nullable VkImageViewCreateInfocreateSafe(long address) static @Nullable VkImageViewCreateInfo.BuffercreateSafe(long address, int capacity) intflags()a bitmask ofVkImageViewCreateFlagBitsspecifying additional parameters of the image view.flags(int value) Sets the specified value to theflags()field.intformat()aVkFormatspecifying the format and type used to interpret texel blocks of the image.format(int value) Sets the specified value to theformat()field.longimage()aVkImageon which the view will be created.image(long value) Sets the specified value to theimage()field.static VkImageViewCreateInfomalloc()Returns a newVkImageViewCreateInfoinstance allocated withmemAlloc.static VkImageViewCreateInfo.Buffermalloc(int capacity) Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemAlloc.static VkImageViewCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkImageViewCreateInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStack.static VkImageViewCreateInfoDeprecated.static VkImageViewCreateInfo.BuffermallocStack(int capacity) Deprecated.static VkImageViewCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkImageViewCreateInfomallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkComponentMappingncomponents(long struct) Unsafe version ofcomponents().static voidncomponents(long struct, VkComponentMapping value) Unsafe version ofcomponents.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static intnformat(long struct) Unsafe version offormat().static voidnformat(long struct, int value) Unsafe version offormat.static longnimage(long struct) Unsafe version ofimage().static voidnimage(long struct, long value) Unsafe version ofimage.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.static VkImageSubresourceRangensubresourceRange(long struct) Unsafe version ofsubresourceRange().static voidnsubresourceRange(long struct, VkImageSubresourceRange value) Unsafe version ofsubresourceRange.static intnviewType(long struct) Unsafe version ofviewType().static voidnviewType(long struct, int value) Unsafe version ofviewType.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkExportMetalObjectCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkImageViewASTCDecodeModeEXTvalue to thepNextchain.Prepends the specifiedVkImageViewMinLodCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkImageViewSampleWeightCreateInfoQCOMvalue to thepNextchain.Prepends the specifiedVkImageViewSlicedCreateInfoEXTvalue to thepNextchain.pNext(VkImageViewUsageCreateInfo value) Prepends the specifiedVkImageViewUsageCreateInfovalue to thepNextchain.Prepends the specifiedVkImageViewUsageCreateInfoKHRvalue to thepNextchain.Prepends the specifiedVkOpaqueCaptureDescriptorDataCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkSamplerYcbcrConversionInfovalue to thepNextchain.Prepends the specifiedVkSamplerYcbcrConversionInfoKHRvalue to thepNextchain.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.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFOvalue to thesType()field.aVkImageSubresourceRangestructure 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 specifiedVkImageSubresourceRangeto thesubresourceRange()field.intviewType()aVkImageViewTypevalue specifying the type of the image view.viewType(int value) Sets the specified value to theviewType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 aVkImageViewCreateInfoinstance at the current position of the specifiedByteBuffercontainer. 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkImageViewCreateInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
flags
public int flags()a bitmask ofVkImageViewCreateFlagBitsspecifying additional parameters of the image view. -
image
public long image()aVkImageon which the view will be created. -
viewType
public int viewType()aVkImageViewTypevalue specifying the type of the image view. -
format
public int format()aVkFormatspecifying the format and type used to interpret texel blocks of the image. -
components
aVkComponentMappingstructure specifying a remapping of color components (or of depth or stencil components after they have been converted into color components). -
subresourceRange
aVkImageSubresourceRangestructure 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_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkExportMetalObjectCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkImageViewASTCDecodeModeEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkImageViewMinLodCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkImageViewSampleWeightCreateInfoQCOMvalue to thepNextchain. -
pNext
Prepends the specifiedVkImageViewSlicedCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkImageViewUsageCreateInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkImageViewUsageCreateInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkOpaqueCaptureDescriptorDataCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerYcbcrConversionInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerYcbcrConversionInfoKHRvalue to thepNextchain. -
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 specifiedVkComponentMappingto thecomponents()field. -
components
Passes thecomponents()field to the specifiedConsumer. -
subresourceRange
Copies the specifiedVkImageSubresourceRangeto 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 newVkImageViewCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkImageViewCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkImageViewCreateInfoinstance allocated withBufferUtils. -
create
Returns a newVkImageViewCreateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkImageViewCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkImageViewCreateInfo.Bufferinstance 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 public static VkImageViewCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkImageViewCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand 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.
-