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
memoryis notNULL_HANDLE,memorymust be a validVkDeviceMemoryhandle flagsmust be a valid combination ofVkSparseMemoryBindFlagBitsvalues- If
memoryis notNULL_HANDLE,memoryandmemoryOffsetmust match the memory requirements of the resource - If
memoryis notNULL_HANDLE,memorymust not have been created with a memory type that reportsMEMORY_PROPERTY_LAZILY_ALLOCATED_BITbit set sizemust be greater than 0resourceOffsetmust be less than the size of the resourcesizemust be less than or equal to the size of the resource minusresourceOffsetmemoryOffsetmust be less than the size ofmemorysizemust be less than or equal to the size ofmemoryminusmemoryOffset
Member documentation
resourceOffset– the offset into the resourcesize– the size of the memory region to be boundmemory– theVkDeviceMemoryobject that the range of the resource is bound tomemoryOffset– the offset into theVkDeviceMemoryobject 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 classVkSparseMemoryBind.BufferAn array ofVkSparseMemoryBindstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aVkSparseMemoryBindinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkSparseMemoryBindcalloc()Returns a newVkSparseMemoryBindinstance allocated withmemCalloc.static VkSparseMemoryBind.Buffercalloc(int capacity)Returns a newVkSparseMemoryBind.Bufferinstance allocated withmemCalloc.static VkSparseMemoryBindcallocStack()Returns a newVkSparseMemoryBindinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSparseMemoryBind.BuffercallocStack(int capacity)Returns a newVkSparseMemoryBind.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSparseMemoryBind.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkSparseMemoryBind.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSparseMemoryBindcallocStack(MemoryStack stack)Returns a newVkSparseMemoryBindinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSparseMemoryBindcreate()Returns a newVkSparseMemoryBindinstance allocated withBufferUtils.static VkSparseMemoryBind.Buffercreate(int capacity)Returns a newVkSparseMemoryBind.Bufferinstance allocated withBufferUtils.static VkSparseMemoryBindcreate(long address)Returns a newVkSparseMemoryBindinstance for the specified memory address ornullif the address isNULL.static VkSparseMemoryBind.Buffercreate(long address, int capacity)Create aVkSparseMemoryBind.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.VkSparseMemoryBindflags(int value)Sets the specified value to theflagsfield.static VkSparseMemoryBindmalloc()Returns a newVkSparseMemoryBindinstance allocated withmemAlloc.static VkSparseMemoryBind.Buffermalloc(int capacity)Returns a newVkSparseMemoryBind.Bufferinstance allocated withmemAlloc.static VkSparseMemoryBindmallocStack()Returns a newVkSparseMemoryBindinstance allocated on the thread-localMemoryStack.static VkSparseMemoryBind.BuffermallocStack(int capacity)Returns a newVkSparseMemoryBind.Bufferinstance allocated on the thread-localMemoryStack.static VkSparseMemoryBind.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkSparseMemoryBind.Bufferinstance allocated on the specifiedMemoryStack.static VkSparseMemoryBindmallocStack(MemoryStack stack)Returns a newVkSparseMemoryBindinstance allocated on the specifiedMemoryStack.longmemory()Returns the value of thememoryfield.VkSparseMemoryBindmemory(long value)Sets the specified value to thememoryfield.longmemoryOffset()Returns the value of thememoryOffsetfield.VkSparseMemoryBindmemoryOffset(long value)Sets the specified value to thememoryOffsetfield.VkSparseMemoryBindnset(long struct)Unsafe version ofset.longresourceOffset()Returns the value of theresourceOffsetfield.VkSparseMemoryBindresourceOffset(long value)Sets the specified value to theresourceOffsetfield.VkSparseMemoryBindset(long resourceOffset, long size, long memory, long memoryOffset, int flags)Initializes this struct with the specified values.VkSparseMemoryBindset(VkSparseMemoryBind src)Copies the specified struct data to this struct.longsize()Returns the value of thesizefield.VkSparseMemoryBindsize(long value)Sets the specified value to thesizefield.intsizeof()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 aVkSparseMemoryBindinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
resourceOffset
public long resourceOffset()
Returns the value of theresourceOffsetfield.
-
size
public long size()
Returns the value of thesizefield.
-
memory
public long memory()
Returns the value of thememoryfield.
-
memoryOffset
public long memoryOffset()
Returns the value of thememoryOffsetfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
resourceOffset
public VkSparseMemoryBind resourceOffset(long value)
Sets the specified value to theresourceOffsetfield.
-
size
public VkSparseMemoryBind size(long value)
Sets the specified value to thesizefield.
-
memory
public VkSparseMemoryBind memory(long value)
Sets the specified value to thememoryfield.
-
memoryOffset
public VkSparseMemoryBind memoryOffset(long value)
Sets the specified value to thememoryOffsetfield.
-
flags
public VkSparseMemoryBind flags(int value)
Sets the specified value to theflagsfield.
-
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 newVkSparseMemoryBindinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSparseMemoryBind calloc()
Returns a newVkSparseMemoryBindinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSparseMemoryBind create()
Returns a newVkSparseMemoryBindinstance allocated withBufferUtils.
-
create
public static VkSparseMemoryBind create(long address)
Returns a newVkSparseMemoryBindinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkSparseMemoryBind.Buffer malloc(int capacity)
Returns a newVkSparseMemoryBind.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSparseMemoryBind.Buffer calloc(int capacity)
Returns a newVkSparseMemoryBind.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSparseMemoryBind.Buffer create(int capacity)
Returns a newVkSparseMemoryBind.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSparseMemoryBind.Buffer create(long address, int capacity)
Create aVkSparseMemoryBind.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkSparseMemoryBind mallocStack()
Returns a newVkSparseMemoryBindinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSparseMemoryBind callocStack()
Returns a newVkSparseMemoryBindinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSparseMemoryBind mallocStack(MemoryStack stack)
Returns a newVkSparseMemoryBindinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSparseMemoryBind callocStack(MemoryStack stack)
Returns a newVkSparseMemoryBindinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSparseMemoryBind.Buffer callocStack(int capacity)
Returns a newVkSparseMemoryBind.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSparseMemoryBind.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSparseMemoryBind.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-