public class VkBufferImageCopy
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
When copying to or from a depth or stencil aspect, the data in buffer memory uses a layout that is a (mostly) tightly packed representation of the depth or stencil data. Specifically:
FORMAT_S8_UINT value per texel.FORMAT_D16_UNORM or FORMAT_D16_UNORM_S8_UINT format is tightly packed with one FORMAT_D16_UNORM value per texel.FORMAT_D32_SFLOAT or FORMAT_D32_SFLOAT_S8_UINT format is tightly packed with one FORMAT_D32_SFLOAT value per texel.FORMAT_X8_D24_UNORM_PACK32 or FORMAT_D24_UNORM_S8_UINT format is packed with one 32-bit word per texel with the D24 value in the LSBs of the word, and undefined values in the eight MSBs.To copy both the depth and stencil aspects of a depth/stencil format, two entries in pRegions can be used, where one specifies the depth aspect in imageSubresource, and the other specifies the stencil aspect.
Because depth or stencil aspect buffer to image copies may require format conversions on some implementations, they are not supported on queues that do not support graphics.
When copying to a depth aspect, and the VK_EXT_depth_range_unrestricted extension is not enabled, the data in buffer memory must be in the range [0,1], or the resulting values are undefined.
Copies are done layer by layer starting with image layer baseArrayLayer member of imageSubresource. layerCount layers are copied from the source image or to the destination image.
VkImage parameter’s format is not a depth/stencil format or a multi-planar format, then bufferOffset must be a multiple of the format’s texel block size.VkImage parameter’s format is a multi-planar format, then bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in Compatible formats of planes of multi-planar formatsbufferOffset must be a multiple of 4bufferRowLength must be 0, or greater than or equal to the width member of imageExtentbufferImageHeight must be 0, or greater than or equal to the height member of imageExtentimageOffset.x and (imageExtent.width imageOffset.x) must both be greater than or equal to 0 and less than or equal to the image subresource width where this refers to the width of the plane of the image involved in the copy in the case of a multi-planar formatimageOffset.y and (imageExtent.height imageOffset.y) must both be greater than or equal to 0 and less than or equal to the image subresource height where this refers to the height of the plane of the image involved in the copy in the case of a multi-planar formatsrcImage (CmdCopyImageToBuffer) or dstImage (CmdCopyBufferToImage) is of type IMAGE_TYPE_1D, then imageOffset.y must be 0 and imageExtent.height must be 1.imageOffset.z and (imageExtent.depth imageOffset.z) must both be greater than or equal to 0 and less than or equal to the image subresource depthsrcImage (CmdCopyImageToBuffer) or dstImage (CmdCopyBufferToImage) is of type IMAGE_TYPE_1D or IMAGE_TYPE_2D, then imageOffset.z must be 0 and imageExtent.depth must be 1VkImage parameter is a compressed image, or a single-plane, “_422” image format, bufferRowLength must be a multiple of the compressed texel block widthVkImage parameter is a compressed image, or a single-plane, “_422” image format, bufferImageHeight must be a multiple of the compressed texel block heightVkImage parameter is a compressed image, or a single-plane, “_422” image format, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel blockVkImage parameter is a compressed image, or a single-plane, “_422” image format, bufferOffset must be a multiple of the compressed texel block size in bytesVkImage parameter is a compressed image, or a single-plane, “_422” image format, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width imageOffset.x) must equal the image subresource widthVkImage parameter is a compressed image, or a single-plane, “_422” image format, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height imageOffset.y) must equal the image subresource heightVkImage parameter is a compressed image, or a single-plane, “_422” image format, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth imageOffset.z) must equal the image subresource depthaspectMask member of imageSubresource must specify aspects present in the calling command’s VkImage parameterVkImage parameter’s format is a multi-planar format, then the aspectMask member of imageSubresource must be IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT, or IMAGE_ASPECT_PLANE_2_BIT (with IMAGE_ASPECT_PLANE_2_BIT valid only for image formats with three planes)aspectMask member of imageSubresource must only have a single bit setVkImage parameter is of VkImageType IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of imageSubresource must be 0 and 1, respectivelyimageSubresource must be a valid VkImageSubresourceLayers structureVkExtent3D, VkImageSubresourceLayers, VkOffset3D, CmdCopyBufferToImage, CmdCopyImageToBuffer
bufferOffset – the offset in bytes from the start of the buffer object where the image data is copied from or to.bufferRowLength – bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent.bufferImageHeight – see bufferRowLengthimageSubresource – a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.imageOffset – selects the initial x, y, z offsets in texels of the sub-region of the source or destination image data.imageExtent – the size in texels of the image to copy in width, height and depth.
struct VkBufferImageCopy {
VkDeviceSize bufferOffset;
uint32_t bufferRowLength;
uint32_t bufferImageHeight;
VkImageSubresourceLayers imageSubresource;
VkOffset3D imageOffset;
VkExtent3D imageExtent;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkBufferImageCopy.Buffer
An array of
VkBufferImageCopy structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BUFFERIMAGEHEIGHT
The struct member offsets.
|
static int |
BUFFEROFFSET
The struct member offsets.
|
static int |
BUFFERROWLENGTH
The struct member offsets.
|
static int |
IMAGEEXTENT
The struct member offsets.
|
static int |
IMAGEOFFSET
The struct member offsets.
|
static int |
IMAGESUBRESOURCE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkBufferImageCopy(java.nio.ByteBuffer container)
Creates a
VkBufferImageCopy instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
int |
bufferImageHeight()
Returns the value of the
bufferImageHeight field. |
VkBufferImageCopy |
bufferImageHeight(int value)
Sets the specified value to the
bufferImageHeight field. |
long |
bufferOffset()
Returns the value of the
bufferOffset field. |
VkBufferImageCopy |
bufferOffset(long value)
Sets the specified value to the
bufferOffset field. |
int |
bufferRowLength()
Returns the value of the
bufferRowLength field. |
VkBufferImageCopy |
bufferRowLength(int value)
Sets the specified value to the
bufferRowLength field. |
static VkBufferImageCopy |
calloc()
Returns a new
VkBufferImageCopy instance allocated with memCalloc. |
static VkBufferImageCopy.Buffer |
calloc(int capacity)
Returns a new
VkBufferImageCopy.Buffer instance allocated with memCalloc. |
static VkBufferImageCopy |
callocStack()
Returns a new
VkBufferImageCopy instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkBufferImageCopy.Buffer |
callocStack(int capacity)
Returns a new
VkBufferImageCopy.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkBufferImageCopy.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferImageCopy.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkBufferImageCopy |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferImageCopy instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkBufferImageCopy |
create()
Returns a new
VkBufferImageCopy instance allocated with BufferUtils. |
static VkBufferImageCopy.Buffer |
create(int capacity)
Returns a new
VkBufferImageCopy.Buffer instance allocated with BufferUtils. |
static VkBufferImageCopy |
create(long address)
Returns a new
VkBufferImageCopy instance for the specified memory address. |
static VkBufferImageCopy.Buffer |
create(long address,
int capacity)
Create a
VkBufferImageCopy.Buffer instance at the specified memory. |
static VkBufferImageCopy |
createSafe(long address)
|
static VkBufferImageCopy.Buffer |
createSafe(long address,
int capacity)
|
VkExtent3D |
imageExtent()
Returns a
VkExtent3D view of the imageExtent field. |
VkBufferImageCopy |
imageExtent(java.util.function.Consumer<VkExtent3D> consumer)
Passes the
imageExtent field to the specified Consumer. |
VkBufferImageCopy |
imageExtent(VkExtent3D value)
Copies the specified
VkExtent3D to the imageExtent field. |
VkOffset3D |
imageOffset()
Returns a
VkOffset3D view of the imageOffset field. |
VkBufferImageCopy |
imageOffset(java.util.function.Consumer<VkOffset3D> consumer)
Passes the
imageOffset field to the specified Consumer. |
VkBufferImageCopy |
imageOffset(VkOffset3D value)
Copies the specified
VkOffset3D to the imageOffset field. |
VkImageSubresourceLayers |
imageSubresource()
Returns a
VkImageSubresourceLayers view of the imageSubresource field. |
VkBufferImageCopy |
imageSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes the
imageSubresource field to the specified Consumer. |
VkBufferImageCopy |
imageSubresource(VkImageSubresourceLayers value)
Copies the specified
VkImageSubresourceLayers to the imageSubresource field. |
static VkBufferImageCopy |
malloc()
Returns a new
VkBufferImageCopy instance allocated with memAlloc. |
static VkBufferImageCopy.Buffer |
malloc(int capacity)
Returns a new
VkBufferImageCopy.Buffer instance allocated with memAlloc. |
static VkBufferImageCopy |
mallocStack()
Returns a new
VkBufferImageCopy instance allocated on the thread-local MemoryStack. |
static VkBufferImageCopy.Buffer |
mallocStack(int capacity)
Returns a new
VkBufferImageCopy.Buffer instance allocated on the thread-local MemoryStack. |
static VkBufferImageCopy.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferImageCopy.Buffer instance allocated on the specified MemoryStack. |
static VkBufferImageCopy |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferImageCopy instance allocated on the specified MemoryStack. |
static int |
nbufferImageHeight(long struct)
Unsafe version of
bufferImageHeight(). |
static void |
nbufferImageHeight(long struct,
int value)
Unsafe version of
bufferImageHeight. |
static long |
nbufferOffset(long struct)
Unsafe version of
bufferOffset(). |
static void |
nbufferOffset(long struct,
long value)
Unsafe version of
bufferOffset. |
static int |
nbufferRowLength(long struct)
Unsafe version of
bufferRowLength(). |
static void |
nbufferRowLength(long struct,
int value)
Unsafe version of
bufferRowLength. |
static VkExtent3D |
nimageExtent(long struct)
Unsafe version of
imageExtent(). |
static void |
nimageExtent(long struct,
VkExtent3D value)
Unsafe version of
imageExtent. |
static VkOffset3D |
nimageOffset(long struct)
Unsafe version of
imageOffset(). |
static void |
nimageOffset(long struct,
VkOffset3D value)
Unsafe version of
imageOffset. |
static VkImageSubresourceLayers |
nimageSubresource(long struct)
Unsafe version of
imageSubresource(). |
static void |
nimageSubresource(long struct,
VkImageSubresourceLayers value)
Unsafe version of
imageSubresource. |
VkBufferImageCopy |
set(long bufferOffset,
int bufferRowLength,
int bufferImageHeight,
VkImageSubresourceLayers imageSubresource,
VkOffset3D imageOffset,
VkExtent3D imageExtent)
Initializes this struct with the specified values.
|
VkBufferImageCopy |
set(VkBufferImageCopy src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int BUFFEROFFSET
public static final int BUFFERROWLENGTH
public static final int BUFFERIMAGEHEIGHT
public static final int IMAGESUBRESOURCE
public static final int IMAGEOFFSET
public static final int IMAGEEXTENT
public VkBufferImageCopy(java.nio.ByteBuffer container)
VkBufferImageCopy 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 long bufferOffset()
bufferOffset field.public int bufferRowLength()
bufferRowLength field.public int bufferImageHeight()
bufferImageHeight field.public VkImageSubresourceLayers imageSubresource()
VkImageSubresourceLayers view of the imageSubresource field.public VkOffset3D imageOffset()
VkOffset3D view of the imageOffset field.public VkExtent3D imageExtent()
VkExtent3D view of the imageExtent field.public VkBufferImageCopy bufferOffset(long value)
bufferOffset field.public VkBufferImageCopy bufferRowLength(int value)
bufferRowLength field.public VkBufferImageCopy bufferImageHeight(int value)
bufferImageHeight field.public VkBufferImageCopy imageSubresource(VkImageSubresourceLayers value)
VkImageSubresourceLayers to the imageSubresource field.public VkBufferImageCopy imageSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
imageSubresource field to the specified Consumer.public VkBufferImageCopy imageOffset(VkOffset3D value)
VkOffset3D to the imageOffset field.public VkBufferImageCopy imageOffset(java.util.function.Consumer<VkOffset3D> consumer)
imageOffset field to the specified Consumer.public VkBufferImageCopy imageExtent(VkExtent3D value)
VkExtent3D to the imageExtent field.public VkBufferImageCopy imageExtent(java.util.function.Consumer<VkExtent3D> consumer)
imageExtent field to the specified Consumer.public VkBufferImageCopy set(long bufferOffset, int bufferRowLength, int bufferImageHeight, VkImageSubresourceLayers imageSubresource, VkOffset3D imageOffset, VkExtent3D imageExtent)
public VkBufferImageCopy set(VkBufferImageCopy src)
src - the source structpublic static VkBufferImageCopy malloc()
VkBufferImageCopy instance allocated with memAlloc. The instance must be explicitly freed.public static VkBufferImageCopy calloc()
VkBufferImageCopy instance allocated with memCalloc. The instance must be explicitly freed.public static VkBufferImageCopy create()
VkBufferImageCopy instance allocated with BufferUtils.public static VkBufferImageCopy create(long address)
VkBufferImageCopy instance for the specified memory address.@Nullable public static VkBufferImageCopy createSafe(long address)
public static VkBufferImageCopy.Buffer malloc(int capacity)
VkBufferImageCopy.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkBufferImageCopy.Buffer calloc(int capacity)
VkBufferImageCopy.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkBufferImageCopy.Buffer create(int capacity)
VkBufferImageCopy.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkBufferImageCopy.Buffer create(long address, int capacity)
VkBufferImageCopy.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkBufferImageCopy.Buffer createSafe(long address, int capacity)
public static VkBufferImageCopy mallocStack()
VkBufferImageCopy instance allocated on the thread-local MemoryStack.public static VkBufferImageCopy callocStack()
VkBufferImageCopy instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkBufferImageCopy mallocStack(org.lwjgl.system.MemoryStack stack)
VkBufferImageCopy instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkBufferImageCopy callocStack(org.lwjgl.system.MemoryStack stack)
VkBufferImageCopy instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkBufferImageCopy.Buffer mallocStack(int capacity)
VkBufferImageCopy.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkBufferImageCopy.Buffer callocStack(int capacity)
VkBufferImageCopy.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkBufferImageCopy.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkBufferImageCopy.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkBufferImageCopy.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkBufferImageCopy.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 long nbufferOffset(long struct)
bufferOffset().public static int nbufferRowLength(long struct)
bufferRowLength().public static int nbufferImageHeight(long struct)
bufferImageHeight().public static VkImageSubresourceLayers nimageSubresource(long struct)
imageSubresource().public static VkOffset3D nimageOffset(long struct)
imageOffset().public static VkExtent3D nimageExtent(long struct)
imageExtent().public static void nbufferOffset(long struct,
long value)
bufferOffset.public static void nbufferRowLength(long struct,
int value)
bufferRowLength.public static void nbufferImageHeight(long struct,
int value)
bufferImageHeight.public static void nimageSubresource(long struct,
VkImageSubresourceLayers value)
imageSubresource.public static void nimageOffset(long struct,
VkOffset3D value)
imageOffset.public static void nimageExtent(long struct,
VkExtent3D value)
imageExtent.Copyright LWJGL. All Rights Reserved. License terms.