The number of mipmap levels and array layers must be a subset of the image subresources in the image. If an application wants to use all mip levels or layers in an image after the baseMipLevel or baseArrayLayer, it can set levelCount and layerCount to the special values REMAINING_MIP_LEVELS and REMAINING_ARRAY_LAYERS without knowing the exact number of mip levels or layers.
For cube and cube array image views, the layers of the image view starting at baseArrayLayer correspond to faces in the order +X, -X, +Y, -Y, +Z, -Z. For cube arrays, each set of six sequential layers is a single cube, so the number of cube maps in a cube map array view is layerCount / 6, and image array layer (baseArrayLayer + i) is face index (i mod 6) of cube i / 6. If the number of layers in the view, whether set explicitly in layerCount or implied by REMAINING_ARRAY_LAYERS, is not a multiple of 6, the last cube map in the array must not be accessed.
aspectMask must be only IMAGE_ASPECT_COLOR_BIT, IMAGE_ASPECT_DEPTH_BIT or IMAGE_ASPECT_STENCIL_BIT if format is a color, depth-only or stencil-only format, respectively, except if format is a multi-planar format. If using a depth/stencil format with both depth and stencil components, aspectMask must include at least one of IMAGE_ASPECT_DEPTH_BIT and IMAGE_ASPECT_STENCIL_BIT, and can include both.
When the VkImageSubresourceRange structure is used to select a subset of the slices of a 3D image’s mip level in order to create a 2D or 2D array image view of a 3D image created with IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, baseArrayLayer and layerCount specify the first slice index and the number of slices to include in the created image view. Such an image view can be used as a framebuffer attachment that refers only to the specified range of slices of the selected mip level. However, any layout transitions performed on such an attachment view during a render pass instance still apply to the entire subresource referenced which includes all the slices of the selected mip level.
When using an image view of a depth/stencil image to populate a descriptor set (e.g. for sampling in the shader, or for use as an input attachment), the aspectMask must only include one bit, which selects whether the image view is used for depth reads (i.e. using a floating-point sampler or input attachment in the shader) or stencil reads (i.e. using an unsigned integer sampler or input attachment in the shader). When an image view of a depth/stencil image is used as a depth/stencil framebuffer attachment, the aspectMask is ignored and both depth and stencil image subresources are used.
When creating a VkImageView, if sampler Y′CBCR conversion is enabled in the sampler, the aspectMask of a subresourceRange used by the VkImageView must be IMAGE_ASPECT_COLOR_BIT.
When creating a VkImageView, if sampler Y′CBCR conversion is not enabled in the sampler and the image format is multi-planar, the image must have been created with IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the aspectMask of the VkImageView’s subresourceRange must be IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT or IMAGE_ASPECT_PLANE_2_BIT.
levelCount is not REMAINING_MIP_LEVELS, it must be greater than 0layerCount is not REMAINING_ARRAY_LAYERS, it must be greater than 0aspectMask includes IMAGE_ASPECT_COLOR_BIT, then it must not include any of IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT, or IMAGE_ASPECT_PLANE_2_BITaspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index iaspectMask must be a valid combination of VkImageAspectFlagBits valuesaspectMask must not be 0VkHostImageLayoutTransitionInfoEXT, VkImageMemoryBarrier, VkImageMemoryBarrier2, VkImageViewCreateInfo, CmdClearColorImage, CmdClearDepthStencilImage
struct VkImageSubresourceRange {
VkImageAspectFlags aspectMask;
uint32_t baseMipLevel;
uint32_t levelCount;
uint32_t baseArrayLayer;
uint32_t layerCount;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkImageSubresourceRange.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | ASPECTMASK
The struct member offsets. |
| public static final int | BASEARRAYLAYER
The struct member offsets. |
| public static final int | BASEMIPLEVEL
The struct member offsets. |
| public static final int | LAYERCOUNT
The struct member offsets. |
| public static final int | LEVELCOUNT
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkImageSubresourceRange(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public int | aspectMask()
a bitmask of |
| public VkImageSubresourceRange | |
| public int | |
| public VkImageSubresourceRange | |
| public int | |
| public VkImageSubresourceRange | |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkImageSubresourceRange | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkImageSubresourceRange. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange. | |
| public static VkImageSubresourceRange. | |
| protected VkImageSubresourceRange | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange | create(long address)
Returns a new |
| public static VkImageSubresourceRange. | create(int
the buffer capacity capacity)Returns a new |
| public static VkImageSubresourceRange. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange. | |
| public int | |
| public VkImageSubresourceRange | |
| public int | |
| public VkImageSubresourceRange | |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkImageSubresourceRange | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkImageSubresourceRange. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange | |
| public static VkImageSubresourceRange. | |
| public static VkImageSubresourceRange. | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public VkImageSubresourceRange | set(int aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Initializes this struct with the specified values. |
| public VkImageSubresourceRange | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| ASPECTMASK | back to summary |
|---|---|
| public static final int ASPECTMASK The struct member offsets. | |
| BASEARRAYLAYER | back to summary |
|---|---|
| public static final int BASEARRAYLAYER The struct member offsets. | |
| BASEMIPLEVEL | back to summary |
|---|---|
| public static final int BASEMIPLEVEL The struct member offsets. | |
| LAYERCOUNT | back to summary |
|---|---|
| public static final int LAYERCOUNT The struct member offsets. | |
| LEVELCOUNT | back to summary |
|---|---|
| public static final int LEVELCOUNT The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| VkImageSubresourceRange | back to summary |
|---|---|
| protected VkImageSubresourceRange(long address, ByteBuffer container) | |
| VkImageSubresourceRange | back to summary |
|---|---|
| public VkImageSubresourceRange(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| aspectMask | back to summary |
|---|---|
| public int aspectMask() a bitmask of
| |
| aspectMask | back to summary |
|---|---|
| public VkImageSubresourceRange aspectMask(int value) Sets the specified value to the | |
| baseArrayLayer | back to summary |
|---|---|
| public int baseArrayLayer() the first array layer accessible to the view.
| |
| baseArrayLayer | back to summary |
|---|---|
| public VkImageSubresourceRange baseArrayLayer(int value) Sets the specified value to the | |
| baseMipLevel | back to summary |
|---|---|
| public int baseMipLevel() the first mipmap level accessible to the view.
| |
| baseMipLevel | back to summary |
|---|---|
| public VkImageSubresourceRange baseMipLevel(int value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static VkImageSubresourceRange calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkImageSubresourceRange. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkImageSubresourceRange calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkImageSubresourceRange. Returns a new
| |
| callocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange callocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange callocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| create | back to summary |
|---|---|
| protected VkImageSubresourceRange create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkImageSubresourceRange create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkImageSubresourceRange create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkImageSubresourceRange. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkImageSubresourceRange. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkImageSubresourceRange createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkImageSubresourceRange. Like
| |
| layerCount | back to summary |
|---|---|
| public int layerCount() the number of array layers (starting from
| |
| layerCount | back to summary |
|---|---|
| public VkImageSubresourceRange layerCount(int value) Sets the specified value to the | |
| levelCount | back to summary |
|---|---|
| public int levelCount() the number of mipmap levels (starting from
| |
| levelCount | back to summary |
|---|---|
| public VkImageSubresourceRange levelCount(int value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static VkImageSubresourceRange malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkImageSubresourceRange. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkImageSubresourceRange malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkImageSubresourceRange. Returns a new
| |
| mallocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange mallocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange mallocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static VkImageSubresourceRange. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| naspectMask | back to summary |
|---|---|
| public static int naspectMask(long struct) Unsafe version of | |
| naspectMask | back to summary |
|---|---|
| public static void naspectMask(long struct, int value) Unsafe version of | |
| nbaseArrayLayer | back to summary |
|---|---|
| public static int nbaseArrayLayer(long struct) Unsafe version of | |
| nbaseArrayLayer | back to summary |
|---|---|
| public static void nbaseArrayLayer(long struct, int value) Unsafe version of | |
| nbaseMipLevel | back to summary |
|---|---|
| public static int nbaseMipLevel(long struct) Unsafe version of | |
| nbaseMipLevel | back to summary |
|---|---|
| public static void nbaseMipLevel(long struct, int value) Unsafe version of | |
| nlayerCount | back to summary |
|---|---|
| public static int nlayerCount(long struct) Unsafe version of | |
| nlayerCount | back to summary |
|---|---|
| public static void nlayerCount(long struct, int value) Unsafe version of | |
| nlevelCount | back to summary |
|---|---|
| public static int nlevelCount(long struct) Unsafe version of | |
| nlevelCount | back to summary |
|---|---|
| public static void nlevelCount(long struct, int value) Unsafe version of | |
| set | back to summary |
|---|---|
| public VkImageSubresourceRange set(int aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkImageSubresourceRange set(VkImageSubresourceRange src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
VkImageSubresourceRange structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkImageSubresourceRange |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public VkImageSubresourceRange. | |
| public int | |
| public VkImageSubresourceRange. | baseArrayLayer(int value)
Sets the specified value to the |
| public int | |
| public VkImageSubresourceRange. | |
| protected VkImageSubresourceRange | |
| public int | |
| public VkImageSubresourceRange. | |
| public int | |
| public VkImageSubresourceRange. | |
| protected VkImageSubresourceRange. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkImageSubresourceRange ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| aspectMask | back to summary |
|---|---|
public int aspectMask()
| |
| aspectMask | back to summary |
|---|---|
| public VkImageSubresourceRange. Sets the specified value to the | |
| baseArrayLayer | back to summary |
|---|---|
public int baseArrayLayer()
| |
| baseArrayLayer | back to summary |
|---|---|
| public VkImageSubresourceRange. Sets the specified value to the | |
| baseMipLevel | back to summary |
|---|---|
public int baseMipLevel()
| |
| baseMipLevel | back to summary |
|---|---|
| public VkImageSubresourceRange. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkImageSubresourceRange getElementFactory() Implements abstract org.
| |
| layerCount | back to summary |
|---|---|
public int layerCount()
| |
| layerCount | back to summary |
|---|---|
| public VkImageSubresourceRange. Sets the specified value to the | |
| levelCount | back to summary |
|---|---|
public int levelCount()
| |
| levelCount | back to summary |
|---|---|
| public VkImageSubresourceRange. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected VkImageSubresourceRange. Implements abstract org.
| |