Package org.lwjgl.vulkan
Class VkSparseMemoryBind
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSparseMemoryBind
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkSparseMemoryBind extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a sparse memory binding.
Valid Usage
- If
memory
is notNULL_HANDLE
,memory
must be a validVkDeviceMemory
handle flags
must be a valid combination ofVkSparseMemoryBindFlagBits
values- If
memory
is notNULL_HANDLE
,memory
andmemoryOffset
must match the memory requirements of the resource - If
memory
is notNULL_HANDLE
,memory
must not have been created with a memory type that reportsMEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
bit set size
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 minusresourceOffset
memoryOffset
must be less than the size ofmemory
size
must be less than or equal to the size ofmemory
minusmemoryOffset
Member documentation
resourceOffset
– the offset into the resourcesize
– the size of the memory region to be boundmemory
– theVkDeviceMemory
object that the range of the resource is bound tomemoryOffset
– the offset into theVkDeviceMemory
object to bind the resource range toflags
– are sparse memory binding flags. One or more of:SPARSE_MEMORY_BIND_METADATA_BIT
Layout
struct VkSparseMemoryBind { VkDeviceSize resourceOffset; VkDeviceSize size; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkSparseMemoryBindFlags flags; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkSparseMemoryBind.Buffer
An array ofVkSparseMemoryBind
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 VkSparseMemoryBind(java.nio.ByteBuffer container)
Creates aVkSparseMemoryBind
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 static VkSparseMemoryBind
calloc()
Returns a newVkSparseMemoryBind
instance allocated withmemCalloc
.static VkSparseMemoryBind.Buffer
calloc(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated withmemCalloc
.static VkSparseMemoryBind
callocStack()
Returns a newVkSparseMemoryBind
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSparseMemoryBind.Buffer
callocStack(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSparseMemoryBind.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSparseMemoryBind
callocStack(MemoryStack stack)
Returns a newVkSparseMemoryBind
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSparseMemoryBind
create()
Returns a newVkSparseMemoryBind
instance allocated withBufferUtils
.static VkSparseMemoryBind.Buffer
create(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated withBufferUtils
.static VkSparseMemoryBind
create(long address)
Returns a newVkSparseMemoryBind
instance for the specified memory address ornull
if the address isNULL
.static VkSparseMemoryBind.Buffer
create(long address, int capacity)
Create aVkSparseMemoryBind.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkSparseMemoryBind
flags(int value)
Sets the specified value to theflags
field.static VkSparseMemoryBind
malloc()
Returns a newVkSparseMemoryBind
instance allocated withmemAlloc
.static VkSparseMemoryBind.Buffer
malloc(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated withmemAlloc
.static VkSparseMemoryBind
mallocStack()
Returns a newVkSparseMemoryBind
instance allocated on the thread-localMemoryStack
.static VkSparseMemoryBind.Buffer
mallocStack(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
.static VkSparseMemoryBind.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the specifiedMemoryStack
.static VkSparseMemoryBind
mallocStack(MemoryStack stack)
Returns a newVkSparseMemoryBind
instance allocated on the specifiedMemoryStack
.long
memory()
Returns the value of thememory
field.VkSparseMemoryBind
memory(long value)
Sets the specified value to thememory
field.long
memoryOffset()
Returns the value of thememoryOffset
field.VkSparseMemoryBind
memoryOffset(long value)
Sets the specified value to thememoryOffset
field.VkSparseMemoryBind
nset(long struct)
Unsafe version ofset
.long
resourceOffset()
Returns the value of theresourceOffset
field.VkSparseMemoryBind
resourceOffset(long value)
Sets the specified value to theresourceOffset
field.VkSparseMemoryBind
set(long resourceOffset, long size, long memory, long memoryOffset, int flags)
Initializes this struct with the specified values.VkSparseMemoryBind
set(VkSparseMemoryBind src)
Copies the specified struct data to this struct.long
size()
Returns the value of thesize
field.VkSparseMemoryBind
size(long value)
Sets the specified value to thesize
field.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
-
VkSparseMemoryBind
public VkSparseMemoryBind(java.nio.ByteBuffer container)
Creates aVkSparseMemoryBind
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)
.
-
resourceOffset
public long resourceOffset()
Returns the value of theresourceOffset
field.
-
size
public long size()
Returns the value of thesize
field.
-
memory
public long memory()
Returns the value of thememory
field.
-
memoryOffset
public long memoryOffset()
Returns the value of thememoryOffset
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
resourceOffset
public VkSparseMemoryBind resourceOffset(long value)
Sets the specified value to theresourceOffset
field.
-
size
public VkSparseMemoryBind size(long value)
Sets the specified value to thesize
field.
-
memory
public VkSparseMemoryBind memory(long value)
Sets the specified value to thememory
field.
-
memoryOffset
public VkSparseMemoryBind memoryOffset(long value)
Sets the specified value to thememoryOffset
field.
-
flags
public VkSparseMemoryBind flags(int value)
Sets the specified value to theflags
field.
-
set
public VkSparseMemoryBind set(long resourceOffset, long size, long memory, long memoryOffset, int flags)
Initializes this struct with the specified values.
-
nset
public VkSparseMemoryBind nset(long struct)
Unsafe version ofset
.
-
set
public VkSparseMemoryBind set(VkSparseMemoryBind src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkSparseMemoryBind malloc()
Returns a newVkSparseMemoryBind
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSparseMemoryBind calloc()
Returns a newVkSparseMemoryBind
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSparseMemoryBind create()
Returns a newVkSparseMemoryBind
instance allocated withBufferUtils
.
-
create
public static VkSparseMemoryBind create(long address)
Returns a newVkSparseMemoryBind
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkSparseMemoryBind.Buffer malloc(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSparseMemoryBind.Buffer calloc(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSparseMemoryBind.Buffer create(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSparseMemoryBind.Buffer create(long address, int capacity)
Create aVkSparseMemoryBind.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkSparseMemoryBind mallocStack()
Returns a newVkSparseMemoryBind
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSparseMemoryBind callocStack()
Returns a newVkSparseMemoryBind
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSparseMemoryBind mallocStack(MemoryStack stack)
Returns a newVkSparseMemoryBind
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSparseMemoryBind callocStack(MemoryStack stack)
Returns a newVkSparseMemoryBind
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkSparseMemoryBind.Buffer mallocStack(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSparseMemoryBind.Buffer callocStack(int capacity)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkSparseMemoryBind.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkSparseMemoryBind.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkSparseMemoryBind.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-