Package org.lwjgl.vulkan
Class VkSparseImageMemoryBind
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSparseImageMemoryBind
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkSparseImageMemoryBind extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a memory binding to a sparse image block of a
VkImageobject.Valid Usage
subresourcemust be a validVkImageSubresourcestructure- If
memoryis notNULL_HANDLE,memorymust be a validVkDeviceMemoryhandle flagsmust be a valid combination ofVkSparseMemoryBindFlagBitsvalues- If the sparse aliased residency feature is not enabled, and if any other resources are bound to ranges of
memory, the range ofmemorybeing bound must not overlap with those bound ranges memoryandmemoryOffsetmust match the memory requirements of the calling command'simagesubresourcemust be a valid image subresource forimageoffset.xmust be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of the imageextent.widthmust either be a multiple of the sparse image block width of the image, or elseextent.width+offset.xmust equal the width of the image subresourceoffset.ymust be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of the imageextent.heightmust either be a multiple of the sparse image block height of the image, or elseextent.height+offset.ymust equal the height of the image subresourceoffset.zmust be a multiple of the sparse image block depth (VkSparseImageFormatProperties::imageGranularity.depth) of the imageextent.depthmust either be a multiple of the sparse image block depth of the image, or elseextent.depth+offset.zmust equal the depth of the image subresource
Member documentation
subresource– theaspectMaskand region of interest in the imageoffset– the coordinates of the first texel within the image subresource to bindextent– 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 ofoffset + extentequals the corresponding dimensions of the image subresource.memory– theVkDeviceMemoryobject that the sparse image blocks of the image are bound to. If memory isNULL_HANDLE, the sparse image blocks are unbound.memoryOffset– an offset intoVkDeviceMemoryobject. IfmemoryisNULL_HANDLE, this value is ignored.flags– sparse memory binding flags. One or more of:SPARSE_MEMORY_BIND_METADATA_BIT
Layout
struct VkSparseImageMemoryBind {VkImageSubresourcesubresource;VkOffset3Doffset;VkExtent3Dextent; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkSparseMemoryBindFlags flags; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkSparseImageMemoryBind.BufferAn array ofVkSparseImageMemoryBindstructs.-
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 VkSparseImageMemoryBind(java.nio.ByteBuffer container)Creates aVkSparseImageMemoryBindinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkSparseImageMemoryBindcalloc()Returns a newVkSparseImageMemoryBindinstance allocated withmemCalloc.static VkSparseImageMemoryBind.Buffercalloc(int capacity)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemCalloc.static VkSparseImageMemoryBindcallocStack()Returns a newVkSparseImageMemoryBindinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSparseImageMemoryBind.BuffercallocStack(int capacity)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSparseImageMemoryBind.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSparseImageMemoryBindcallocStack(MemoryStack stack)Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSparseImageMemoryBindcreate()Returns a newVkSparseImageMemoryBindinstance allocated withBufferUtils.static VkSparseImageMemoryBind.Buffercreate(int capacity)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withBufferUtils.static VkSparseImageMemoryBindcreate(long address)Returns a newVkSparseImageMemoryBindinstance for the specified memory address ornullif the address isNULL.static VkSparseImageMemoryBind.Buffercreate(long address, int capacity)Create aVkSparseImageMemoryBind.Bufferinstance at the specified memory.VkExtent3Dextent()Returns aVkExtent3Dview of theextentfield.VkSparseImageMemoryBindextent(VkExtent3D value)Copies the specifiedVkExtent3Dto theextentfield.intflags()Returns the value of theflagsfield.VkSparseImageMemoryBindflags(int value)Sets the specified value to theflagsfield.static VkSparseImageMemoryBindmalloc()Returns a newVkSparseImageMemoryBindinstance allocated withmemAlloc.static VkSparseImageMemoryBind.Buffermalloc(int capacity)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemAlloc.static VkSparseImageMemoryBindmallocStack()Returns a newVkSparseImageMemoryBindinstance allocated on the thread-localMemoryStack.static VkSparseImageMemoryBind.BuffermallocStack(int capacity)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the thread-localMemoryStack.static VkSparseImageMemoryBind.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStack.static VkSparseImageMemoryBindmallocStack(MemoryStack stack)Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStack.longmemory()Returns the value of thememoryfield.VkSparseImageMemoryBindmemory(long value)Sets the specified value to thememoryfield.longmemoryOffset()Returns the value of thememoryOffsetfield.VkSparseImageMemoryBindmemoryOffset(long value)Sets the specified value to thememoryOffsetfield.VkSparseImageMemoryBindnset(long struct)Unsafe version ofset.VkOffset3Doffset()Returns aVkOffset3Dview of theoffsetfield.VkSparseImageMemoryBindoffset(VkOffset3D value)Copies the specifiedVkOffset3Dto theoffsetfield.VkSparseImageMemoryBindset(VkImageSubresource subresource, VkOffset3D offset, VkExtent3D extent, long memory, long memoryOffset, int flags)Initializes this struct with the specified values.VkSparseImageMemoryBindset(VkSparseImageMemoryBind src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).VkImageSubresourcesubresource()Returns aVkImageSubresourceview of thesubresourcefield.VkSparseImageMemoryBindsubresource(VkImageSubresource value)Copies the specifiedVkImageSubresourceto thesubresourcefield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkSparseImageMemoryBind
public VkSparseImageMemoryBind(java.nio.ByteBuffer container)
Creates aVkSparseImageMemoryBindinstance 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).
-
subresource
public VkImageSubresource subresource()
Returns aVkImageSubresourceview of thesubresourcefield.
-
offset
public VkOffset3D offset()
Returns aVkOffset3Dview of theoffsetfield.
-
extent
public VkExtent3D extent()
Returns aVkExtent3Dview of theextentfield.
-
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.
-
subresource
public VkSparseImageMemoryBind subresource(VkImageSubresource value)
Copies the specifiedVkImageSubresourceto thesubresourcefield.
-
offset
public VkSparseImageMemoryBind offset(VkOffset3D value)
Copies the specifiedVkOffset3Dto theoffsetfield.
-
extent
public VkSparseImageMemoryBind extent(VkExtent3D value)
Copies the specifiedVkExtent3Dto theextentfield.
-
memory
public VkSparseImageMemoryBind memory(long value)
Sets the specified value to thememoryfield.
-
memoryOffset
public VkSparseImageMemoryBind memoryOffset(long value)
Sets the specified value to thememoryOffsetfield.
-
flags
public VkSparseImageMemoryBind flags(int value)
Sets the specified value to theflagsfield.
-
set
public VkSparseImageMemoryBind set(VkImageSubresource subresource, VkOffset3D offset, VkExtent3D extent, long memory, long memoryOffset, int flags)
Initializes this struct with the specified values.
-
nset
public VkSparseImageMemoryBind nset(long struct)
Unsafe version ofset.
-
set
public VkSparseImageMemoryBind set(VkSparseImageMemoryBind src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkSparseImageMemoryBind malloc()
Returns a newVkSparseImageMemoryBindinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSparseImageMemoryBind calloc()
Returns a newVkSparseImageMemoryBindinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSparseImageMemoryBind create()
Returns a newVkSparseImageMemoryBindinstance allocated withBufferUtils.
-
create
public static VkSparseImageMemoryBind create(long address)
Returns a newVkSparseImageMemoryBindinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkSparseImageMemoryBind.Buffer malloc(int capacity)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSparseImageMemoryBind.Buffer calloc(int capacity)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSparseImageMemoryBind.Buffer create(int capacity)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSparseImageMemoryBind.Buffer create(long address, int capacity)
Create aVkSparseImageMemoryBind.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkSparseImageMemoryBind mallocStack()
Returns a newVkSparseImageMemoryBindinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSparseImageMemoryBind callocStack()
Returns a newVkSparseImageMemoryBindinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSparseImageMemoryBind mallocStack(MemoryStack stack)
Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSparseImageMemoryBind callocStack(MemoryStack stack)
Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkSparseImageMemoryBind.Buffer mallocStack(int capacity)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSparseImageMemoryBind.Buffer callocStack(int capacity)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSparseImageMemoryBind.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkSparseImageMemoryBind.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-