public class VkSparseImageMemoryBind
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
memory, the range of memory being bound must not overlap with those bound rangesmemory and memoryOffset must match the memory requirements of the calling command’s image, as described in section Resource Memory Associationsubresource must be a valid image subresource for image (see Image Views)offset.x must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of the imageextent.width must either be a multiple of the sparse image block width of the image, or else (extent.width offset.x) must equal the width of the image subresourceoffset.y must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of the imageextent.height must either be a multiple of the sparse image block height of the image, or else (extent.height offset.y) must equal the height of the image subresourceoffset.z must be a multiple of the sparse image block depth (VkSparseImageFormatProperties::imageGranularity.depth) of the imageextent.depth must either be a multiple of the sparse image block depth of the image, or else (extent.depth offset.z) must equal the depth of the image subresourcememory was created with VkExportMemoryAllocateInfo::handleTypes not equal to 0, at least one handle type it contained must also have been set in VkExternalMemoryImageCreateInfo::handleTypes when the image was created.memory was created by a memory import operation, the external handle type of the imported memory must also have been set in VkExternalMemoryImageCreateInfo::handleTypes when image was created.subresource must be a valid VkImageSubresource structurememory is not NULL_HANDLE, memory must be a valid VkDeviceMemory handleflags must be a valid combination of VkSparseMemoryBindFlagBits valuesVkExtent3D, VkImageSubresource, VkOffset3D, VkSparseImageMemoryBindInfo
subresource – the image aspect and region of interest in the image.offset – are the coordinates of the first texel within the image subresource to bind.extent – the size in texels of the region within the image subresource to bind. The extent must be a multiple of the sparse image block dimensions, except when binding sparse image blocks along the edge of an image subresource it can instead be such that any coordinate of offset + extent equals the corresponding dimensions of the image subresource.memory – the VkDeviceMemory object that the sparse image blocks of the image are bound to. If memory is NULL_HANDLE, the sparse image blocks are unbound.memoryOffset – an offset into VkDeviceMemory object. If memory is NULL_HANDLE, this value is ignored.flags – are sparse memory binding flags.
struct VkSparseImageMemoryBind {
VkImageSubresource subresource;
VkOffset3D offset;
VkExtent3D extent;
VkDeviceMemory memory;
VkDeviceSize memoryOffset;
VkSparseMemoryBindFlags flags;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkSparseImageMemoryBind.Buffer
An array of
VkSparseImageMemoryBind structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
EXTENT
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
MEMORY
The struct member offsets.
|
static int |
MEMORYOFFSET
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SUBRESOURCE
The struct member offsets.
|
| Constructor and Description |
|---|
VkSparseImageMemoryBind(java.nio.ByteBuffer container)
Creates a
VkSparseImageMemoryBind instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkSparseImageMemoryBind |
calloc()
Returns a new
VkSparseImageMemoryBind instance allocated with memCalloc. |
static VkSparseImageMemoryBind.Buffer |
calloc(int capacity)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated with memCalloc. |
static VkSparseImageMemoryBind |
callocStack()
Returns a new
VkSparseImageMemoryBind instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSparseImageMemoryBind.Buffer |
callocStack(int capacity)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSparseImageMemoryBind.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSparseImageMemoryBind |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSparseImageMemoryBind instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSparseImageMemoryBind |
create()
Returns a new
VkSparseImageMemoryBind instance allocated with BufferUtils. |
static VkSparseImageMemoryBind.Buffer |
create(int capacity)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated with BufferUtils. |
static VkSparseImageMemoryBind |
create(long address)
Returns a new
VkSparseImageMemoryBind instance for the specified memory address. |
static VkSparseImageMemoryBind.Buffer |
create(long address,
int capacity)
Create a
VkSparseImageMemoryBind.Buffer instance at the specified memory. |
static VkSparseImageMemoryBind |
createSafe(long address)
|
static VkSparseImageMemoryBind.Buffer |
createSafe(long address,
int capacity)
|
VkExtent3D |
extent()
Returns a
VkExtent3D view of the extent field. |
VkSparseImageMemoryBind |
extent(java.util.function.Consumer<VkExtent3D> consumer)
Passes the
extent field to the specified Consumer. |
VkSparseImageMemoryBind |
extent(VkExtent3D value)
Copies the specified
VkExtent3D to the extent field. |
int |
flags()
Returns the value of the
flags field. |
VkSparseImageMemoryBind |
flags(int value)
Sets the specified value to the
flags field. |
static VkSparseImageMemoryBind |
malloc()
Returns a new
VkSparseImageMemoryBind instance allocated with memAlloc. |
static VkSparseImageMemoryBind.Buffer |
malloc(int capacity)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated with memAlloc. |
static VkSparseImageMemoryBind |
mallocStack()
Returns a new
VkSparseImageMemoryBind instance allocated on the thread-local MemoryStack. |
static VkSparseImageMemoryBind.Buffer |
mallocStack(int capacity)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated on the thread-local MemoryStack. |
static VkSparseImageMemoryBind.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSparseImageMemoryBind.Buffer instance allocated on the specified MemoryStack. |
static VkSparseImageMemoryBind |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSparseImageMemoryBind instance allocated on the specified MemoryStack. |
long |
memory()
Returns the value of the
memory field. |
VkSparseImageMemoryBind |
memory(long value)
Sets the specified value to the
memory field. |
long |
memoryOffset()
Returns the value of the
memoryOffset field. |
VkSparseImageMemoryBind |
memoryOffset(long value)
Sets the specified value to the
memoryOffset field. |
static VkExtent3D |
nextent(long struct)
Unsafe version of
extent(). |
static void |
nextent(long struct,
VkExtent3D value)
Unsafe version of
extent. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static long |
nmemory(long struct)
Unsafe version of
memory(). |
static void |
nmemory(long struct,
long value)
Unsafe version of
memory. |
static long |
nmemoryOffset(long struct)
Unsafe version of
memoryOffset(). |
static void |
nmemoryOffset(long struct,
long value)
Unsafe version of
memoryOffset. |
static VkOffset3D |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
VkOffset3D value)
Unsafe version of
offset. |
static VkImageSubresource |
nsubresource(long struct)
Unsafe version of
subresource(). |
static void |
nsubresource(long struct,
VkImageSubresource value)
Unsafe version of
subresource. |
VkOffset3D |
offset()
Returns a
VkOffset3D view of the offset field. |
VkSparseImageMemoryBind |
offset(java.util.function.Consumer<VkOffset3D> consumer)
Passes the
offset field to the specified Consumer. |
VkSparseImageMemoryBind |
offset(VkOffset3D value)
Copies the specified
VkOffset3D to the offset field. |
VkSparseImageMemoryBind |
set(VkImageSubresource subresource,
VkOffset3D offset,
VkExtent3D extent,
long memory,
long memoryOffset,
int flags)
Initializes this struct with the specified values.
|
VkSparseImageMemoryBind |
set(VkSparseImageMemoryBind src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
VkImageSubresource |
subresource()
Returns a
VkImageSubresource view of the subresource field. |
VkSparseImageMemoryBind |
subresource(java.util.function.Consumer<VkImageSubresource> consumer)
Passes the
subresource field to the specified Consumer. |
VkSparseImageMemoryBind |
subresource(VkImageSubresource value)
Copies the specified
VkImageSubresource to the subresource field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int SUBRESOURCE
public static final int OFFSET
public static final int EXTENT
public static final int MEMORY
public static final int MEMORYOFFSET
public static final int FLAGS
public VkSparseImageMemoryBind(java.nio.ByteBuffer container)
VkSparseImageMemoryBind 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 VkImageSubresource subresource()
VkImageSubresource view of the subresource field.public VkOffset3D offset()
VkOffset3D view of the offset field.public VkExtent3D extent()
VkExtent3D view of the extent field.public long memory()
memory field.public long memoryOffset()
memoryOffset field.public int flags()
flags field.public VkSparseImageMemoryBind subresource(VkImageSubresource value)
VkImageSubresource to the subresource field.public VkSparseImageMemoryBind subresource(java.util.function.Consumer<VkImageSubresource> consumer)
subresource field to the specified Consumer.public VkSparseImageMemoryBind offset(VkOffset3D value)
VkOffset3D to the offset field.public VkSparseImageMemoryBind offset(java.util.function.Consumer<VkOffset3D> consumer)
offset field to the specified Consumer.public VkSparseImageMemoryBind extent(VkExtent3D value)
VkExtent3D to the extent field.public VkSparseImageMemoryBind extent(java.util.function.Consumer<VkExtent3D> consumer)
extent field to the specified Consumer.public VkSparseImageMemoryBind memory(long value)
memory field.public VkSparseImageMemoryBind memoryOffset(long value)
memoryOffset field.public VkSparseImageMemoryBind flags(int value)
flags field.public VkSparseImageMemoryBind set(VkImageSubresource subresource, VkOffset3D offset, VkExtent3D extent, long memory, long memoryOffset, int flags)
public VkSparseImageMemoryBind set(VkSparseImageMemoryBind src)
src - the source structpublic static VkSparseImageMemoryBind malloc()
VkSparseImageMemoryBind instance allocated with memAlloc. The instance must be explicitly freed.public static VkSparseImageMemoryBind calloc()
VkSparseImageMemoryBind instance allocated with memCalloc. The instance must be explicitly freed.public static VkSparseImageMemoryBind create()
VkSparseImageMemoryBind instance allocated with BufferUtils.public static VkSparseImageMemoryBind create(long address)
VkSparseImageMemoryBind instance for the specified memory address.@Nullable public static VkSparseImageMemoryBind createSafe(long address)
public static VkSparseImageMemoryBind.Buffer malloc(int capacity)
VkSparseImageMemoryBind.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSparseImageMemoryBind.Buffer calloc(int capacity)
VkSparseImageMemoryBind.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSparseImageMemoryBind.Buffer create(int capacity)
VkSparseImageMemoryBind.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkSparseImageMemoryBind.Buffer create(long address, int capacity)
VkSparseImageMemoryBind.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkSparseImageMemoryBind.Buffer createSafe(long address, int capacity)
public static VkSparseImageMemoryBind mallocStack()
VkSparseImageMemoryBind instance allocated on the thread-local MemoryStack.public static VkSparseImageMemoryBind callocStack()
VkSparseImageMemoryBind instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkSparseImageMemoryBind mallocStack(org.lwjgl.system.MemoryStack stack)
VkSparseImageMemoryBind instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkSparseImageMemoryBind callocStack(org.lwjgl.system.MemoryStack stack)
VkSparseImageMemoryBind instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkSparseImageMemoryBind.Buffer mallocStack(int capacity)
VkSparseImageMemoryBind.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkSparseImageMemoryBind.Buffer callocStack(int capacity)
VkSparseImageMemoryBind.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkSparseImageMemoryBind.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSparseImageMemoryBind.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkSparseImageMemoryBind.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSparseImageMemoryBind.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 VkImageSubresource nsubresource(long struct)
subresource().public static VkOffset3D noffset(long struct)
offset().public static VkExtent3D nextent(long struct)
extent().public static long nmemory(long struct)
memory().public static long nmemoryOffset(long struct)
memoryOffset().public static int nflags(long struct)
flags().public static void nsubresource(long struct,
VkImageSubresource value)
subresource.public static void noffset(long struct,
VkOffset3D value)
offset.public static void nextent(long struct,
VkExtent3D value)
extent.public static void nmemory(long struct,
long value)
memory.public static void nmemoryOffset(long struct,
long value)
memoryOffset.public static void nflags(long struct,
int value)
flags.Copyright LWJGL. All Rights Reserved. License terms.