Package org.lwjgl.vulkan
Class VkBufferImageCopy
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBufferImageCopy
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkBufferImageCopy extends Struct
Khronos Reference Page
Vulkan SpecificationSpecifies a region to copy.
Valid Usage
imageSubresource
must be a validVkImageSubresourceLayers
structurebufferOffset
must be a multiple of the calling command'sVkImage
parameter's texel sizebufferOffset
must be a multiple of 4bufferRowLength
must be 0, or greater than or equal to thewidth
member ofimageExtent
bufferImageHeight
must be 0, or greater than or equal to theheight
member ofimageExtent
imageOffset.x
and (imageExtent.width
+imageOffset.x
) must both be greater than or equal to 0 and less than or equal to the image subresource widthimageOffset.y
and (imageExtent.height +imageOffset.y
) must both be greater than or equal to 0 and less than or equal to the image subresource heightimageOffset.z
and (imageExtent.depth +imageOffset.z
) must both be greater than or equal to 0 and less than or equal to the image subresource depth- If the calling command's
VkImage
parameter is a compressed format image: bufferOffset
,bufferRowLength
,bufferImageHeight
and all members ofimageOffset
andimageExtent
must respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in Physical Device Enumeration- The
aspectMask
member ofimageSubresource
must specify aspects present in the calling command'sVkImage
parameter - The
aspectMask
member ofimageSubresource
must only have a single bit set - If the calling command's
VkImage
parameter is ofVkImageType
IMAGE_TYPE_3D
, thebaseArrayLayer
andlayerCount
members ofimageSubresource
must be 0 and 1, respectively
Member documentation
bufferOffset
– the offset in bytes from the start of the buffer object where the image data is copied from or tobufferRowLength
– the buffer row lengthbufferImageHeight
– the buffer image heightimageSubresource
– aVkImageSubresourceLayers
used to specify the specific image subresources of the image used for the source or destination image dataimageOffset
– selects the initial x, y, z offsets in texels of the sub-region of the source or destination image dataimageExtent
– the size in texels of the image to copy in width, height and depth
Layout
struct VkBufferImageCopy { VkDeviceSize bufferOffset; uint32_t bufferRowLength; uint32_t bufferImageHeight;
VkImageSubresourceLayers
imageSubresource;VkOffset3D
imageOffset;VkExtent3D
imageExtent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkBufferImageCopy.Buffer
An array ofVkBufferImageCopy
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkBufferImageCopy(java.nio.ByteBuffer container)
Creates aVkBufferImageCopy
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
bufferImageHeight()
Returns the value of thebufferImageHeight
field.VkBufferImageCopy
bufferImageHeight(int value)
Sets the specified value to thebufferImageHeight
field.long
bufferOffset()
Returns the value of thebufferOffset
field.VkBufferImageCopy
bufferOffset(long value)
Sets the specified value to thebufferOffset
field.int
bufferRowLength()
Returns the value of thebufferRowLength
field.VkBufferImageCopy
bufferRowLength(int value)
Sets the specified value to thebufferRowLength
field.static VkBufferImageCopy
calloc()
Returns a newVkBufferImageCopy
instance allocated withmemCalloc
.static VkBufferImageCopy.Buffer
calloc(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated withmemCalloc
.static VkBufferImageCopy
callocStack()
Returns a newVkBufferImageCopy
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferImageCopy.Buffer
callocStack(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferImageCopy.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferImageCopy
callocStack(MemoryStack stack)
Returns a newVkBufferImageCopy
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferImageCopy
create()
Returns a newVkBufferImageCopy
instance allocated withBufferUtils
.static VkBufferImageCopy.Buffer
create(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated withBufferUtils
.static VkBufferImageCopy
create(long address)
Returns a newVkBufferImageCopy
instance for the specified memory address ornull
if the address isNULL
.static VkBufferImageCopy.Buffer
create(long address, int capacity)
Create aVkBufferImageCopy.Buffer
instance at the specified memory.VkExtent3D
imageExtent()
Returns aVkExtent3D
view of theimageExtent
field.VkBufferImageCopy
imageExtent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theimageExtent
field.VkOffset3D
imageOffset()
Returns aVkOffset3D
view of theimageOffset
field.VkBufferImageCopy
imageOffset(VkOffset3D value)
Copies the specifiedVkOffset3D
to theimageOffset
field.VkImageSubresourceLayers
imageSubresource()
Returns aVkImageSubresourceLayers
view of theimageSubresource
field.VkBufferImageCopy
imageSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to theimageSubresource
field.static VkBufferImageCopy
malloc()
Returns a newVkBufferImageCopy
instance allocated withmemAlloc
.static VkBufferImageCopy.Buffer
malloc(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated withmemAlloc
.static VkBufferImageCopy
mallocStack()
Returns a newVkBufferImageCopy
instance allocated on the thread-localMemoryStack
.static VkBufferImageCopy.Buffer
mallocStack(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the thread-localMemoryStack
.static VkBufferImageCopy.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the specifiedMemoryStack
.static VkBufferImageCopy
mallocStack(MemoryStack stack)
Returns a newVkBufferImageCopy
instance allocated on the specifiedMemoryStack
.VkBufferImageCopy
nset(long struct)
Unsafe version ofset
.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()
Returns thesizeof(struct)
.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkBufferImageCopy
public VkBufferImageCopy(java.nio.ByteBuffer container)
Creates aVkBufferImageCopy
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
bufferOffset
public long bufferOffset()
Returns the value of thebufferOffset
field.
-
bufferRowLength
public int bufferRowLength()
Returns the value of thebufferRowLength
field.
-
bufferImageHeight
public int bufferImageHeight()
Returns the value of thebufferImageHeight
field.
-
imageSubresource
public VkImageSubresourceLayers imageSubresource()
Returns aVkImageSubresourceLayers
view of theimageSubresource
field.
-
imageOffset
public VkOffset3D imageOffset()
Returns aVkOffset3D
view of theimageOffset
field.
-
imageExtent
public VkExtent3D imageExtent()
Returns aVkExtent3D
view of theimageExtent
field.
-
bufferOffset
public VkBufferImageCopy bufferOffset(long value)
Sets the specified value to thebufferOffset
field.
-
bufferRowLength
public VkBufferImageCopy bufferRowLength(int value)
Sets the specified value to thebufferRowLength
field.
-
bufferImageHeight
public VkBufferImageCopy bufferImageHeight(int value)
Sets the specified value to thebufferImageHeight
field.
-
imageSubresource
public VkBufferImageCopy imageSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to theimageSubresource
field.
-
imageOffset
public VkBufferImageCopy imageOffset(VkOffset3D value)
Copies the specifiedVkOffset3D
to theimageOffset
field.
-
imageExtent
public VkBufferImageCopy imageExtent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theimageExtent
field.
-
set
public VkBufferImageCopy set(long bufferOffset, int bufferRowLength, int bufferImageHeight, VkImageSubresourceLayers imageSubresource, VkOffset3D imageOffset, VkExtent3D imageExtent)
Initializes this struct with the specified values.
-
nset
public VkBufferImageCopy nset(long struct)
Unsafe version ofset
.
-
set
public VkBufferImageCopy set(VkBufferImageCopy src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkBufferImageCopy malloc()
Returns a newVkBufferImageCopy
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkBufferImageCopy calloc()
Returns a newVkBufferImageCopy
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkBufferImageCopy create()
Returns a newVkBufferImageCopy
instance allocated withBufferUtils
.
-
create
public static VkBufferImageCopy create(long address)
Returns a newVkBufferImageCopy
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkBufferImageCopy.Buffer malloc(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkBufferImageCopy.Buffer calloc(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferImageCopy.Buffer create(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferImageCopy.Buffer create(long address, int capacity)
Create aVkBufferImageCopy.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkBufferImageCopy mallocStack()
Returns a newVkBufferImageCopy
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkBufferImageCopy callocStack()
Returns a newVkBufferImageCopy
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkBufferImageCopy mallocStack(MemoryStack stack)
Returns a newVkBufferImageCopy
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkBufferImageCopy callocStack(MemoryStack stack)
Returns a newVkBufferImageCopy
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkBufferImageCopy.Buffer mallocStack(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkBufferImageCopy.Buffer callocStack(int capacity)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkBufferImageCopy.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkBufferImageCopy.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkBufferImageCopy.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-