public class VkImageCopy
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
For IMAGE_TYPE_3D images, copies are performed slice by slice starting with the z member of the srcOffset or dstOffset, and copying depth slices. For images with multiple layers, copies are performed layer by layer starting with the baseArrayLayer member of the srcSubresource or dstSubresource and copying layerCount layers. Image data can be copied between images with different image types. If one image is IMAGE_TYPE_3D and the other image is IMAGE_TYPE_2D with multiple layers, then each slice is copied to or from a different layer.
Copies involving a multi-planar image format specify the region to be copied in terms of the plane to be copied, not the coordinates of the multi-planar image. This means that copies accessing the R/B planes of "_422" format images must fit the copied region within half the width of the parent image, and that copies accessing the R/B planes of "_420" format images must fit the copied region within half the width and height of the parent image.
srcImage nor the calling command’s dstImage has a multi-planar image format then the aspectMask member of srcSubresource and dstSubresource must matchsrcImage has a VkFormat with two planes then the srcSubresource aspectMask must be IMAGE_ASPECT_PLANE_0_BIT or IMAGE_ASPECT_PLANE_1_BITsrcImage has a VkFormat with three planes then the srcSubresource aspectMask must be IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT, or IMAGE_ASPECT_PLANE_2_BITdstImage has a VkFormat with two planes then the dstSubresource aspectMask must be IMAGE_ASPECT_PLANE_0_BIT or IMAGE_ASPECT_PLANE_1_BITdstImage has a VkFormat with three planes then the dstSubresource aspectMask must be IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT, or IMAGE_ASPECT_PLANE_2_BITsrcImage has a multi-planar image format and the dstImage does not have a multi-planar image format, the dstSubresource aspectMask must be IMAGE_ASPECT_COLOR_BITdstImage has a multi-planar image format and the srcImage does not have a multi-planar image format, the srcSubresource aspectMask must be IMAGE_ASPECT_COLOR_BITextent (for 3D) or layers of the srcSubresource (for non-3D) must match the number of slices of the extent (for 3D) or layers of the dstSubresource (for non-3D)srcImage or dstImage parameters are of VkImageType IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of the corresponding subresource must be 0 and 1, respectivelyaspectMask member of srcSubresource must specify aspects present in the calling command’s srcImageaspectMask member of dstSubresource must specify aspects present in the calling command’s dstImagesrcOffset.x and (extent.width srcOffset.x) must both be greater than or equal to 0 and less than or equal to the source image subresource widthsrcOffset.y and (extent.height srcOffset.y) must both be greater than or equal to 0 and less than or equal to the source image subresource heightsrcImage is of type IMAGE_TYPE_1D, then srcOffset.y must be 0 and extent.height must be 1.srcOffset.z and (extent.depth srcOffset.z) must both be greater than or equal to 0 and less than or equal to the source image subresource depthsrcImage is of type IMAGE_TYPE_1D, then srcOffset.z must be 0 and extent.depth must be 1.dstImage is of type IMAGE_TYPE_1D, then dstOffset.z must be 0 and extent.depth must be 1.srcImage is of type IMAGE_TYPE_2D, then srcOffset.z must be 0.dstImage is of type IMAGE_TYPE_2D, then dstOffset.z must be 0.srcImage and dstImage are of type IMAGE_TYPE_2D then extent.depth must be 1.srcImage is of type IMAGE_TYPE_2D, and the dstImage is of type IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of srcSubresource.dstImage is of type IMAGE_TYPE_2D, and the srcImage is of type IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of dstSubresource.dstOffset.x and (extent.width dstOffset.x) must both be greater than or equal to 0 and less than or equal to the destination image subresource widthdstOffset.y and (extent.height dstOffset.y) must both be greater than or equal to 0 and less than or equal to the destination image subresource heightdstImage is of type IMAGE_TYPE_1D, then dstOffset.y must be 0 and extent.height must be 1.dstOffset.z and (extent.depth dstOffset.z) must both be greater than or equal to 0 and less than or equal to the destination image subresource depthsrcImage is a compressed image, or a single-plane, “_422” image format, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel blocksrcImage is a compressed image, or a single-plane, “_422” image format, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource widthsrcImage is a compressed image, or a single-plane, “_422” image format, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource heightsrcImage is a compressed image, or a single-plane, “_422” image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depthdstImage is a compressed format image, or a single-plane, “_422” image format, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel blockdstImage is a compressed format image, or a single-plane, “_422” image format, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource widthdstImage is a compressed format image, or a single-plane, “_422” image format, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource heightdstImage is a compressed format image, or a single-plane, “_422” image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depthsrcSubresource must be a valid VkImageSubresourceLayers structuredstSubresource must be a valid VkImageSubresourceLayers structureVkExtent3D, VkImageSubresourceLayers, VkOffset3D, CmdCopyImage
srcSubresource – srcSubresource and dstSubresource are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively.srcOffset – srcOffset and dstOffset select the initial x, y, and z offsets in texels of the sub-regions of the source and destination image data.dstSubresource – see srcSubresourcedstOffset – see srcOffsetextent – the size in texels of the image to copy in width, height and depth.
struct VkImageCopy {
VkImageSubresourceLayers srcSubresource;
VkOffset3D srcOffset;
VkImageSubresourceLayers dstSubresource;
VkOffset3D dstOffset;
VkExtent3D extent;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkImageCopy.Buffer
An array of
VkImageCopy structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DSTOFFSET
The struct member offsets.
|
static int |
DSTSUBRESOURCE
The struct member offsets.
|
static int |
EXTENT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SRCOFFSET
The struct member offsets.
|
static int |
SRCSUBRESOURCE
The struct member offsets.
|
| Constructor and Description |
|---|
VkImageCopy(java.nio.ByteBuffer container)
Creates a
VkImageCopy instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkImageCopy |
calloc()
Returns a new
VkImageCopy instance allocated with memCalloc. |
static VkImageCopy.Buffer |
calloc(int capacity)
Returns a new
VkImageCopy.Buffer instance allocated with memCalloc. |
static VkImageCopy |
callocStack()
Returns a new
VkImageCopy instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImageCopy.Buffer |
callocStack(int capacity)
Returns a new
VkImageCopy.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImageCopy.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageCopy.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImageCopy |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageCopy instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImageCopy |
create()
Returns a new
VkImageCopy instance allocated with BufferUtils. |
static VkImageCopy.Buffer |
create(int capacity)
Returns a new
VkImageCopy.Buffer instance allocated with BufferUtils. |
static VkImageCopy |
create(long address)
Returns a new
VkImageCopy instance for the specified memory address. |
static VkImageCopy.Buffer |
create(long address,
int capacity)
Create a
VkImageCopy.Buffer instance at the specified memory. |
static VkImageCopy |
createSafe(long address)
|
static VkImageCopy.Buffer |
createSafe(long address,
int capacity)
|
VkOffset3D |
dstOffset()
Returns a
VkOffset3D view of the dstOffset field. |
VkImageCopy |
dstOffset(java.util.function.Consumer<VkOffset3D> consumer)
Passes the
dstOffset field to the specified Consumer. |
VkImageCopy |
dstOffset(VkOffset3D value)
Copies the specified
VkOffset3D to the dstOffset field. |
VkImageSubresourceLayers |
dstSubresource()
Returns a
VkImageSubresourceLayers view of the dstSubresource field. |
VkImageCopy |
dstSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes the
dstSubresource field to the specified Consumer. |
VkImageCopy |
dstSubresource(VkImageSubresourceLayers value)
Copies the specified
VkImageSubresourceLayers to the dstSubresource field. |
VkExtent3D |
extent()
Returns a
VkExtent3D view of the extent field. |
VkImageCopy |
extent(java.util.function.Consumer<VkExtent3D> consumer)
Passes the
extent field to the specified Consumer. |
VkImageCopy |
extent(VkExtent3D value)
Copies the specified
VkExtent3D to the extent field. |
static VkImageCopy |
malloc()
Returns a new
VkImageCopy instance allocated with memAlloc. |
static VkImageCopy.Buffer |
malloc(int capacity)
Returns a new
VkImageCopy.Buffer instance allocated with memAlloc. |
static VkImageCopy |
mallocStack()
Returns a new
VkImageCopy instance allocated on the thread-local MemoryStack. |
static VkImageCopy.Buffer |
mallocStack(int capacity)
Returns a new
VkImageCopy.Buffer instance allocated on the thread-local MemoryStack. |
static VkImageCopy.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageCopy.Buffer instance allocated on the specified MemoryStack. |
static VkImageCopy |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageCopy instance allocated on the specified MemoryStack. |
static VkOffset3D |
ndstOffset(long struct)
Unsafe version of
dstOffset(). |
static void |
ndstOffset(long struct,
VkOffset3D value)
Unsafe version of
dstOffset. |
static VkImageSubresourceLayers |
ndstSubresource(long struct)
Unsafe version of
dstSubresource(). |
static void |
ndstSubresource(long struct,
VkImageSubresourceLayers value)
Unsafe version of
dstSubresource. |
static VkExtent3D |
nextent(long struct)
Unsafe version of
extent(). |
static void |
nextent(long struct,
VkExtent3D value)
Unsafe version of
extent. |
static VkOffset3D |
nsrcOffset(long struct)
Unsafe version of
srcOffset(). |
static void |
nsrcOffset(long struct,
VkOffset3D value)
Unsafe version of
srcOffset. |
static VkImageSubresourceLayers |
nsrcSubresource(long struct)
Unsafe version of
srcSubresource(). |
static void |
nsrcSubresource(long struct,
VkImageSubresourceLayers value)
Unsafe version of
srcSubresource. |
VkImageCopy |
set(VkImageCopy src)
Copies the specified struct data to this struct.
|
VkImageCopy |
set(VkImageSubresourceLayers srcSubresource,
VkOffset3D srcOffset,
VkImageSubresourceLayers dstSubresource,
VkOffset3D dstOffset,
VkExtent3D extent)
Initializes this struct with the specified values.
|
int |
sizeof() |
VkOffset3D |
srcOffset()
Returns a
VkOffset3D view of the srcOffset field. |
VkImageCopy |
srcOffset(java.util.function.Consumer<VkOffset3D> consumer)
Passes the
srcOffset field to the specified Consumer. |
VkImageCopy |
srcOffset(VkOffset3D value)
Copies the specified
VkOffset3D to the srcOffset field. |
VkImageSubresourceLayers |
srcSubresource()
Returns a
VkImageSubresourceLayers view of the srcSubresource field. |
VkImageCopy |
srcSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes the
srcSubresource field to the specified Consumer. |
VkImageCopy |
srcSubresource(VkImageSubresourceLayers value)
Copies the specified
VkImageSubresourceLayers to the srcSubresource field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int SRCSUBRESOURCE
public static final int SRCOFFSET
public static final int DSTSUBRESOURCE
public static final int DSTOFFSET
public static final int EXTENT
public VkImageCopy(java.nio.ByteBuffer container)
VkImageCopy instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic VkImageSubresourceLayers srcSubresource()
VkImageSubresourceLayers view of the srcSubresource field.public VkOffset3D srcOffset()
VkOffset3D view of the srcOffset field.public VkImageSubresourceLayers dstSubresource()
VkImageSubresourceLayers view of the dstSubresource field.public VkOffset3D dstOffset()
VkOffset3D view of the dstOffset field.public VkExtent3D extent()
VkExtent3D view of the extent field.public VkImageCopy srcSubresource(VkImageSubresourceLayers value)
VkImageSubresourceLayers to the srcSubresource field.public VkImageCopy srcSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
srcSubresource field to the specified Consumer.public VkImageCopy srcOffset(VkOffset3D value)
VkOffset3D to the srcOffset field.public VkImageCopy srcOffset(java.util.function.Consumer<VkOffset3D> consumer)
srcOffset field to the specified Consumer.public VkImageCopy dstSubresource(VkImageSubresourceLayers value)
VkImageSubresourceLayers to the dstSubresource field.public VkImageCopy dstSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
dstSubresource field to the specified Consumer.public VkImageCopy dstOffset(VkOffset3D value)
VkOffset3D to the dstOffset field.public VkImageCopy dstOffset(java.util.function.Consumer<VkOffset3D> consumer)
dstOffset field to the specified Consumer.public VkImageCopy extent(VkExtent3D value)
VkExtent3D to the extent field.public VkImageCopy extent(java.util.function.Consumer<VkExtent3D> consumer)
extent field to the specified Consumer.public VkImageCopy set(VkImageSubresourceLayers srcSubresource, VkOffset3D srcOffset, VkImageSubresourceLayers dstSubresource, VkOffset3D dstOffset, VkExtent3D extent)
public VkImageCopy set(VkImageCopy src)
src - the source structpublic static VkImageCopy malloc()
VkImageCopy instance allocated with memAlloc. The instance must be explicitly freed.public static VkImageCopy calloc()
VkImageCopy instance allocated with memCalloc. The instance must be explicitly freed.public static VkImageCopy create()
VkImageCopy instance allocated with BufferUtils.public static VkImageCopy create(long address)
VkImageCopy instance for the specified memory address.@Nullable public static VkImageCopy createSafe(long address)
public static VkImageCopy.Buffer malloc(int capacity)
VkImageCopy.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImageCopy.Buffer calloc(int capacity)
VkImageCopy.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImageCopy.Buffer create(int capacity)
VkImageCopy.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkImageCopy.Buffer create(long address, int capacity)
VkImageCopy.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkImageCopy.Buffer createSafe(long address, int capacity)
public static VkImageCopy mallocStack()
VkImageCopy instance allocated on the thread-local MemoryStack.public static VkImageCopy callocStack()
VkImageCopy instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkImageCopy mallocStack(org.lwjgl.system.MemoryStack stack)
VkImageCopy instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkImageCopy callocStack(org.lwjgl.system.MemoryStack stack)
VkImageCopy instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkImageCopy.Buffer mallocStack(int capacity)
VkImageCopy.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkImageCopy.Buffer callocStack(int capacity)
VkImageCopy.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkImageCopy.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImageCopy.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkImageCopy.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImageCopy.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkImageSubresourceLayers nsrcSubresource(long struct)
srcSubresource().public static VkOffset3D nsrcOffset(long struct)
srcOffset().public static VkImageSubresourceLayers ndstSubresource(long struct)
dstSubresource().public static VkOffset3D ndstOffset(long struct)
dstOffset().public static VkExtent3D nextent(long struct)
extent().public static void nsrcSubresource(long struct,
VkImageSubresourceLayers value)
srcSubresource.public static void nsrcOffset(long struct,
VkOffset3D value)
srcOffset.public static void ndstSubresource(long struct,
VkImageSubresourceLayers value)
dstSubresource.public static void ndstOffset(long struct,
VkOffset3D value)
dstOffset.public static void nextent(long struct,
VkExtent3D value)
extent.Copyright LWJGL. All Rights Reserved. License terms.