Class VkImageViewCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageViewCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkImageViewCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
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 parameterusage
specifying the allowed usages of the image view that, by default, takes the value of the correspondingusage
parameter specified inVkImageCreateInfo
at image creation time. If the image was has a depth-stencil format and was created with an instance ofVkImageStencilUsageCreateInfoEXT
in thepNext
chain ofVkImageCreateInfo
, the usage is calculated based on thesubresource.aspectMask
provided: IfaspectMask
includes onlyIMAGE_ASPECT_STENCIL_BIT
, the implicitusage
is equal toVkImageStencilUsageCreateInfoEXT
::stencilUsage
. IfaspectMask
includes onlyIMAGE_ASPECT_DEPTH_BIT
, the implicitusage
is equal toVkImageCreateInfo
::usage
. * If both aspects are included inaspectMask
, the implicitusage
is equal to the intersection ofVkImageCreateInfo
::usage
andVkImageStencilUsageCreateInfoEXT
::stencilUsage
. The implicitusage
can be overriden by including an instance ofVkImageViewUsageCreateInfo
structure in thepNext
chain.If
image
was created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag, and if theformat
of the image is not multi-planar,format
can be different from the image's format, but ifimage
was created without theIMAGE_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 theformat
, with only the interpretation of the bit pattern changing.Note
Values intended to be used with one view format may not be exactly preserved when written or read through a different format. For example, an integer value that happens to have the bit pattern of a floating point denorm or NaN may be flushed or canonicalized when written or read through a view with a floating point format. Similarly, a value written through a signed normalized format that has a bit pattern exactly equal to
-2b
may be changed to-2b + 1
as described in Conversion from Normalized Fixed-Point to Floating-Point.If
image
was created with theIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
flag,format
must be compatible with the image's format as described above, or must be an uncompressed format in which case it must be size-compatible with the image's format, as defined for copying data between images In this case the resulting image view's texel dimensions equal the dimensions of the selected mip level divided by the compressed texel block size and rounded up.If the image view is to be used with a sampler which supports sampler Y'CBCR conversion, an identically defined object of type
VkSamplerYcbcrConversion
to that used to create the sampler must be passed toCreateImageView
in aVkSamplerYcbcrConversionInfo
added to thepNext
chain ofVkImageViewCreateInfo
. Conversely, if aVkSamplerYcbcrConversion
object is passed toCreateImageView
, an identically definedVkSamplerYcbcrConversion
object must be used when sampling the image.If the image has a multi-planar
format
andsubresourceRange.aspectMask
isIMAGE_ASPECT_COLOR_BIT
,format
must be identical to the imageformat
, and the sampler to be used with the image view must enable sampler Y'CBCR conversion.If
image
was created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
and the image has a multi-planarformat
, and ifsubresourceRange.aspectMask
isIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_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. Thewidth
andheight
of the single-plane image view must be derived from the multi-planar image's dimensions in the manner listed for plane compatibility for the plane.Any view of an image plane will have the same mapping between texel coordinates and memory locations as used by the channels of the color aspect, subject to the formulae relating texel coordinates to lower-resolution planes as described in Chroma Reconstruction. That is, if an R or B plane has a reduced resolution relative to the G plane of the multi-planar image, the image view operates using the (uplane, vplane) unnormalized coordinates of the reduced-resolution plane, and these coordinates access the same memory locations as the (ucolor, vcolor) unnormalized coordinates of the color aspect for which chroma reconstruction operations operate on the same (uplane, vplane) or (iplane, jplane) coordinates.
Image and image view parameter compatibility requirements
Dim, Arrayed, MS Image parameters View parameters imageType
= ci.imageType
width
= ci.extent.width
height
= ci.extent.height
depth
= ci.extent.depth
arrayLayers
= ci.arrayLayers
samples
= ci.samples
flags
= ci.flags
where ci is theVkImageCreateInfo
used to createimage
.baseArrayLayer
,layerCount
, andlevelCount
are members of thesubresourceRange
member.1D, 0, 0 imageType
=IMAGE_TYPE_1D
width
≥ 1height
= 1depth
= 1arrayLayers
≥ 1samples
= 1viewType
=IMAGE_VIEW_TYPE_1D
baseArrayLayer
≥ 0layerCount
= 11D, 1, 0 imageType
=IMAGE_TYPE_1D
width
≥ 1height
= 1depth
= 1arrayLayers
≥ 1samples
= 1viewType
=IMAGE_VIEW_TYPE_1D_ARRAY
baseArrayLayer
≥ 0layerCount
≥ 12D, 0, 0 imageType
=IMAGE_TYPE_2D
width
≥ 1height
≥ 1depth
= 1arrayLayers
≥ 1samples
= 1viewType
=IMAGE_VIEW_TYPE_2D
baseArrayLayer
≥ 0layerCount
= 12D, 1, 0 imageType
=IMAGE_TYPE_2D
width
≥ 1height
≥ 1depth
= 1arrayLayers
≥ 1samples
= 1viewType
=IMAGE_VIEW_TYPE_2D_ARRAY
baseArrayLayer
≥ 0layerCount
≥ 12D, 0, 1 imageType
=IMAGE_TYPE_2D
width
≥ 1height
≥ 1depth
= 1arrayLayers
≥ 1samples
> 1viewType
=IMAGE_VIEW_TYPE_2D
baseArrayLayer
≥ 0layerCount
= 12D, 1, 1 imageType
=IMAGE_TYPE_2D
width
≥ 1height
≥ 1depth
= 1arrayLayers
≥ 1samples
> 1viewType
=IMAGE_VIEW_TYPE_2D_ARRAY
baseArrayLayer
≥ 0layerCount
≥ 1CUBE, 0, 0 imageType
=IMAGE_TYPE_2D
width
≥ 1height
=width
depth
= 1arrayLayers
≥ 6samples
= 1flags
includesIMAGE_CREATE_CUBE_COMPATIBLE_BIT
viewType
=IMAGE_VIEW_TYPE_CUBE
baseArrayLayer
≥ 0layerCount
= 6CUBE, 1, 0 imageType
=IMAGE_TYPE_2D
width
≥ 1height
= widthdepth
= 1 N ≥ 1arrayLayers
≥ 6 × Nsamples
= 1flags
includesIMAGE_CREATE_CUBE_COMPATIBLE_BIT
viewType
=IMAGE_VIEW_TYPE_CUBE_ARRAY
baseArrayLayer
≥ 0layerCount
= 6 × N, N ≥ 13D, 0, 0 imageType
=IMAGE_TYPE_3D
width
≥ 1height
≥ 1depth
≥ 1arrayLayers
= 1samples
= 1viewType
=IMAGE_VIEW_TYPE_3D
baseArrayLayer
= 0layerCount
= 13D, 0, 0 imageType
=IMAGE_TYPE_3D
width
≥ 1height
≥ 1depth
≥ 1arrayLayers
= 1samples
= 1flags
includesIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR
flags
does not includeIMAGE_CREATE_SPARSE_BINDING_BIT
,IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, andIMAGE_CREATE_SPARSE_ALIASED_BIT
viewType
=IMAGE_VIEW_TYPE_2D
levelCount
= 1baseArrayLayer
≥ 0layerCount
= 13D, 0, 0 imageType
=IMAGE_TYPE_3D
width
≥ 1height
≥ 1depth
≥ 1arrayLayers
= 1samples
= 1flags
includesIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR
flags
does not includeIMAGE_CREATE_SPARSE_BINDING_BIT
,IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, andIMAGE_CREATE_SPARSE_ALIASED_BIT
viewType
=IMAGE_VIEW_TYPE_2D_ARRAY
levelCount
= 1baseArrayLayer
≥ 0layerCount
≥ 1Valid 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 image cubemap arrays 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
orIMAGE_VIEW_TYPE_2D_ARRAY
image
must have been created with ausage
value containing at least one ofIMAGE_USAGE_SAMPLED_BIT
,IMAGE_USAGE_STORAGE_BIT
,IMAGE_USAGE_COLOR_ATTACHMENT_BIT
,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
,IMAGE_USAGE_INPUT_ATTACHMENT_BIT
,IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
, orIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
- 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
. - 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
, then the image view’s format features must contain at least one ofFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
orFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
. 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
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
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 Miplevel 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 Miplevel Sizing. - If
image
was created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag,format
must be compatible with theformat
used to createimage
, as defined in Format Compatibility Classes - 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, thelevelCount
andlayerCount
members ofsubresourceRange
must both be 1. - If a
VkImageFormatListCreateInfoKHR
structure was included in thepNext
chain of theVkImageCreateInfo
struct used when creatingimage
and theviewFormatCount
field ofVkImageFormatListCreateInfoKHR
is not zero thenformat
must be one of the formats inVkImageFormatListCreateInfoKHR
::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 ofIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
, 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 - 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
pNext
chain contains an instance ofVkSamplerYcbcrConversionInfo
with aconversion
value other thanNULL_HANDLE
, all members ofcomponents
must have the valueCOMPONENT_SWIZZLE_IDENTITY
. - If
image
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object subresourceRange
andviewType
must be compatible with the image, as described in the compatibility table- If
image
was created withusage
containingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,viewType
must beIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If
image
was created withusage
containingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,format
must beFORMAT_R8_UINT
- If dynamic fragment density map feature is not enabled,
flags
must not containIMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
- If dynamic fragment density map feature is not enabled and
image
was created withusage
containingIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
,flags
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 an instance ofVkImageViewUsageCreateInfo
, andimage
was not created with an instance ofVkImageStencilUsageCreateInfoEXT
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 an instance ofVkImageViewUsageCreateInfo
,image
was created with an instance ofVkImageStencilUsageCreateInfoEXT
in thepNext
chain ofVkImageCreateInfo
, andsubResourceRange.aspectMask
includesIMAGE_ASPECT_STENCIL_BIT
, theusage
member of theVkImageViewUsageCreateInfo
instance must not include any bits that were not set in theusage
member of theVkImageStencilUsageCreateInfoEXT
structure used to createimage
- If the
pNext
chain includes an instance ofVkImageViewUsageCreateInfo
,image
was created with an instance ofVkImageStencilUsageCreateInfoEXT
in thepNext
chain ofVkImageCreateInfo
, andsubResourceRange.aspectMask
includes bits other thanIMAGE_ASPECT_STENCIL_BIT
, theusage
member of theVkImageViewUsageCreateInfo
instance must not include any bits that were not set in theusage
member of theVkImageCreateInfo
structure used to createimage
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 ofVkImageViewASTCDecodeModeEXT
,VkImageViewUsageCreateInfo
, orVkSamplerYcbcrConversionInfo
- Each
sType
member in thepNext
chain must be unique 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
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.flags
– a bitmask ofVkImageViewCreateFlagBits
describing additional parameters of the image view.image
– aVkImage
on which the view will be created.viewType
– aVkImageViewType
value specifying the type of the image view.format
– aVkFormat
describing the format and type used to interpret texel blocks in the image.components
– aVkComponentMapping
specifies a remapping of color components (or of depth or stencil components after they have been converted into color components).subresourceRange
– aVkImageSubresourceRange
selecting the set of mipmap levels and array layers to be accessible to the view.
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 Modifier and Type Class Description static class
VkImageViewCreateInfo.Buffer
An array ofVkImageViewCreateInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
COMPONENTS
FLAGS
FORMAT
IMAGE
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
SUBRESOURCERANGE
VIEWTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkImageViewCreateInfo(java.nio.ByteBuffer container)
Creates aVkImageViewCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkImageViewCreateInfo
calloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemCalloc
.static VkImageViewCreateInfo.Buffer
calloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemCalloc
.static VkImageViewCreateInfo
callocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.VkComponentMapping
components()
Returns aVkComponentMapping
view of thecomponents
field.VkImageViewCreateInfo
components(java.util.function.Consumer<VkComponentMapping> consumer)
Passes thecomponents
field to the specifiedConsumer
.VkImageViewCreateInfo
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()
Returns the value of theflags
field.VkImageViewCreateInfo
flags(int value)
Sets the specified value to theflags
field.int
format()
Returns the value of theformat
field.VkImageViewCreateInfo
format(int value)
Sets the specified value to theformat
field.long
image()
Returns the value of theimage
field.VkImageViewCreateInfo
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
mallocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
.static VkImageViewCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageViewCreateInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageViewCreateInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
.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()
Returns the value of thepNext
field.VkImageViewCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.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.VkImageViewCreateInfo
set(VkImageViewCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkImageViewCreateInfo
sType(int value)
Sets the specified value to thesType
field.VkImageSubresourceRange
subresourceRange()
Returns aVkImageSubresourceRange
view of thesubresourceRange
field.VkImageViewCreateInfo
subresourceRange(java.util.function.Consumer<VkImageSubresourceRange> consumer)
Passes thesubresourceRange
field to the specifiedConsumer
.VkImageViewCreateInfo
subresourceRange(VkImageSubresourceRange value)
Copies the specifiedVkImageSubresourceRange
to thesubresourceRange
field.int
viewType()
Returns the value of theviewType
field.VkImageViewCreateInfo
viewType(int value)
Sets the specified value to theviewType
field.
-
-
-
Constructor Detail
-
VkImageViewCreateInfo
public VkImageViewCreateInfo(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
image
public long image()
Returns the value of theimage
field.
-
viewType
public int viewType()
Returns the value of theviewType
field.
-
format
public int format()
Returns the value of theformat
field.
-
components
public VkComponentMapping components()
Returns aVkComponentMapping
view of thecomponents
field.
-
subresourceRange
public VkImageSubresourceRange subresourceRange()
Returns aVkImageSubresourceRange
view of thesubresourceRange
field.
-
sType
public VkImageViewCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkImageViewCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkImageViewCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
image
public VkImageViewCreateInfo image(long value)
Sets the specified value to theimage
field.
-
viewType
public VkImageViewCreateInfo viewType(int value)
Sets the specified value to theviewType
field.
-
format
public VkImageViewCreateInfo format(int value)
Sets the specified value to theformat
field.
-
components
public VkImageViewCreateInfo components(VkComponentMapping value)
Copies the specifiedVkComponentMapping
to thecomponents
field.
-
components
public VkImageViewCreateInfo components(java.util.function.Consumer<VkComponentMapping> consumer)
Passes thecomponents
field to the specifiedConsumer
.
-
subresourceRange
public VkImageViewCreateInfo subresourceRange(VkImageSubresourceRange value)
Copies the specifiedVkImageSubresourceRange
to thesubresourceRange
field.
-
subresourceRange
public VkImageViewCreateInfo subresourceRange(java.util.function.Consumer<VkImageSubresourceRange> consumer)
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
public VkImageViewCreateInfo set(VkImageViewCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkImageViewCreateInfo malloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageViewCreateInfo calloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageViewCreateInfo create()
Returns a newVkImageViewCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkImageViewCreateInfo create(long address)
Returns a newVkImageViewCreateInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkImageViewCreateInfo createSafe(long address)
-
malloc
public static VkImageViewCreateInfo.Buffer malloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageViewCreateInfo.Buffer calloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageViewCreateInfo.Buffer create(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageViewCreateInfo.Buffer create(long address, int capacity)
Create aVkImageViewCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkImageViewCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkImageViewCreateInfo mallocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageViewCreateInfo callocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageViewCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageViewCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageViewCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageViewCreateInfo.Buffer callocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageViewCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageViewCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
public static VkComponentMapping ncomponents(long struct)
Unsafe version ofcomponents()
.
-
nsubresourceRange
public static VkImageSubresourceRange nsubresourceRange(long struct)
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
public static void ncomponents(long struct, VkComponentMapping value)
Unsafe version ofcomponents
.
-
nsubresourceRange
public static void nsubresourceRange(long struct, VkImageSubresourceRange value)
Unsafe version ofsubresourceRange
.
-
-