The binding range [resourceOffset, resourceOffset + size) has different constraints based on flags. If flags contains SPARSE_MEMORY_BIND_METADATA_BIT, the binding range must be within the mip tail region of the metadata aspect. This metadata region is defined by:
metadataRegion = [base, base + imageMipTailSize)base = imageMipTailOffset + imageMipTailStride × nand imageMipTailOffset, imageMipTailSize, and imageMipTailStride values are from the VkSparseImageMemoryRequirements corresponding to the metadata aspect of the image, and n is a valid array layer index for the image,
imageMipTailStride is considered to be zero for aspects where VkSparseImageMemoryRequirements::formatProperties.flags contains SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT.
If flags does not contain SPARSE_MEMORY_BIND_METADATA_BIT, the binding range must be within the range [0,.VkMemoryRequirements::size)
memory is not NULL_HANDLE, memory and memoryOffset must match the memory requirements of the resource, as described in section Resource Memory Associationmemory is not NULL_HANDLE, memory must not have been created with a memory type that reports MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit setsize must be greater than 0resourceOffset must be less than the size of the resourcesize must be less than or equal to the size of the resource minus resourceOffsetmemoryOffset must be less than the size of memorysize must be less than or equal to the size of memory minus memoryOffsetmemory was created with VkExportMemoryAllocateInfo::handleTypes not equal to 0, at least one handle type it contained must also have been set in VkExternalMemoryBufferCreateInfo::handleTypes or VkExternalMemoryImageCreateInfo::handleTypes when the resource was createdmemory was created by a memory import operation, the external handle type of the imported memory must also have been set in VkExternalMemoryBufferCreateInfo::handleTypes or VkExternalMemoryImageCreateInfo::handleTypes when the resource was createdmemory is not NULL_HANDLE, memory must be a valid VkDeviceMemory handleflags must be a valid combination of VkSparseMemoryBindFlagBits valuesVkSparseBufferMemoryBindInfo, VkSparseImageOpaqueMemoryBindInfo
struct VkSparseMemoryBind {
VkDeviceSize resourceOffset;
VkDeviceSize size;
VkDeviceMemory memory;
VkDeviceSize memoryOffset;
VkSparseMemoryBindFlags flags;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkSparseMemoryBind.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | MEMORY
The struct member offsets. |
| public static final int | MEMORYOFFSET
The struct member offsets. |
| public static final int | RESOURCEOFFSET
The struct member offsets. |
| public static final int | SIZE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkSparseMemoryBind(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkSparseMemoryBind | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkSparseMemoryBind. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind. | |
| public static VkSparseMemoryBind. | |
| protected VkSparseMemoryBind | 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 VkSparseMemoryBind | |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind. | create(int
the buffer capacity capacity)Returns a new |
| public static VkSparseMemoryBind. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind. | |
| public int | |
| public VkSparseMemoryBind | |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkSparseMemoryBind | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkSparseMemoryBind. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind | |
| public static VkSparseMemoryBind. | |
| public static VkSparseMemoryBind. | |
| public long | |
| public VkSparseMemoryBind | |
| public long | |
| public VkSparseMemoryBind | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public long | |
| public VkSparseMemoryBind | |
| public VkSparseMemoryBind | set(long resourceOffset, long size, long memory, long memoryOffset, int flags)
Initializes this struct with the specified values. |
| public VkSparseMemoryBind | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public long | |
| public VkSparseMemoryBind | |
| public int |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| FLAGS | back to summary |
|---|---|
| public static final int FLAGS The struct member offsets. | |
| MEMORY | back to summary |
|---|---|
| public static final int MEMORY The struct member offsets. | |
| MEMORYOFFSET | back to summary |
|---|---|
| public static final int MEMORYOFFSET The struct member offsets. | |
| RESOURCEOFFSET | back to summary |
|---|---|
| public static final int RESOURCEOFFSET The struct member offsets. | |
| SIZE | back to summary |
|---|---|
| public static final int SIZE The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| VkSparseMemoryBind | back to summary |
|---|---|
| protected VkSparseMemoryBind(long address, ByteBuffer container) | |
| VkSparseMemoryBind | back to summary |
|---|---|
| public VkSparseMemoryBind(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static VkSparseMemoryBind calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkSparseMemoryBind. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkSparseMemoryBind calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkSparseMemoryBind. Returns a new
| |
| callocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind callocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind callocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| create | back to summary |
|---|---|
| protected VkSparseMemoryBind create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkSparseMemoryBind create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkSparseMemoryBind create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkSparseMemoryBind. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkSparseMemoryBind. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkSparseMemoryBind createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkSparseMemoryBind. Like
| |
| flags | back to summary |
|---|---|
| public int flags() a bitmask of
| |
| flags | back to summary |
|---|---|
| public VkSparseMemoryBind flags(int value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static VkSparseMemoryBind malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkSparseMemoryBind. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkSparseMemoryBind malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkSparseMemoryBind. Returns a new
| |
| mallocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind mallocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind mallocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static VkSparseMemoryBind. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| memory | back to summary |
|---|---|
| public long memory() the
| |
| memory | back to summary |
|---|---|
| public VkSparseMemoryBind memory(long value) Sets the specified value to the | |
| memoryOffset | back to summary |
|---|---|
| public long memoryOffset() the offset into the
| |
| memoryOffset | back to summary |
|---|---|
| public VkSparseMemoryBind memoryOffset(long value) Sets the specified value to the | |
| nflags | back to summary |
|---|---|
| public static int nflags(long struct) Unsafe version of | |
| nflags | back to summary |
|---|---|
| public static void nflags(long struct, int value) Unsafe version of | |
| nmemory | back to summary |
|---|---|
| public static long nmemory(long struct) Unsafe version of | |
| nmemory | back to summary |
|---|---|
| public static void nmemory(long struct, long value) Unsafe version of | |
| nmemoryOffset | back to summary |
|---|---|
| public static long nmemoryOffset(long struct) Unsafe version of | |
| nmemoryOffset | back to summary |
|---|---|
| public static void nmemoryOffset(long struct, long value) Unsafe version of | |
| nresourceOffset | back to summary |
|---|---|
| public static long nresourceOffset(long struct) Unsafe version of | |
| nresourceOffset | back to summary |
|---|---|
| public static void nresourceOffset(long struct, long value) Unsafe version of | |
| nsize | back to summary |
|---|---|
| public static long nsize(long struct) Unsafe version of | |
| nsize | back to summary |
|---|---|
| public static void nsize(long struct, long value) Unsafe version of | |
| resourceOffset | back to summary |
|---|---|
| public long resourceOffset() the offset into the resource.
| |
| resourceOffset | back to summary |
|---|---|
| public VkSparseMemoryBind resourceOffset(long value) Sets the specified value to the | |
| set | back to summary |
|---|---|
| public VkSparseMemoryBind set(long resourceOffset, long size, long memory, long memoryOffset, int flags) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkSparseMemoryBind set(VkSparseMemoryBind src) Copies the specified struct data to this struct.
| |
| size | back to summary |
|---|---|
| public long size() the size of the memory region to be bound.
| |
| size | back to summary |
|---|---|
| public VkSparseMemoryBind size(long value) Sets the specified value to the | |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
VkSparseMemoryBind structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkSparseMemoryBind |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public VkSparseMemoryBind. | |
| protected VkSparseMemoryBind | |
| public long | |
| public VkSparseMemoryBind. | |
| public long | |
| public VkSparseMemoryBind. | |
| public long | |
| public VkSparseMemoryBind. | |
| protected VkSparseMemoryBind. | |
| public long | |
| public VkSparseMemoryBind. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkSparseMemoryBind 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) | |
| flags | back to summary |
|---|---|
public int flags()
| |
| flags | back to summary |
|---|---|
| public VkSparseMemoryBind. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkSparseMemoryBind getElementFactory() Implements abstract org.
| |
| memory | back to summary |
|---|---|
public long memory()
| |
| memory | back to summary |
|---|---|
| public VkSparseMemoryBind. Sets the specified value to the | |
| memoryOffset | back to summary |
|---|---|
public long memoryOffset()
| |
| memoryOffset | back to summary |
|---|---|
| public VkSparseMemoryBind. Sets the specified value to the | |
| resourceOffset | back to summary |
|---|---|
public long resourceOffset()
| |
| resourceOffset | back to summary |
|---|---|
| public VkSparseMemoryBind. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected VkSparseMemoryBind. Implements abstract org.
| |
| size | back to summary |
|---|---|
public long size()
| |
| size | back to summary |
|---|---|
| public VkSparseMemoryBind. Sets the specified value to the | |