Package org.lwjgl.vulkan
Class VkSparseImageMemoryBind
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkSparseImageMemoryBind>
org.lwjgl.vulkan.VkSparseImageMemoryBind
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkSparseImageMemoryBind
extends org.lwjgl.system.Struct<VkSparseImageMemoryBind>
implements org.lwjgl.system.NativeResource
Structure specifying sparse image memory bind.
Valid Usage
- If the
sparseResidencyAliasedfeature is not enabled, and if any other resources are bound to ranges ofmemory, the range ofmemorybeing bound must not overlap with those bound ranges memoryandmemoryOffsetmust match the memory requirements of the calling command’simage, as described in section Resource Memory Associationoffset.xmust be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of the imageextent.widthmust be greater than 0extent.widthmust 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.ymust be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of the imageextent.heightmust be greater than 0extent.heightmust 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.zmust be a multiple of the sparse image block depth (VkSparseImageFormatProperties::imageGranularity.depth) of the imageextent.depthmust be greater than 0extent.depthmust 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 subresource- If
memorywas created withVkExportMemoryAllocateInfo::handleTypesnot equal to 0, at least one handle type it contained must also have been set inVkExternalMemoryImageCreateInfo::handleTypeswhen the image was created - If
memorywas created by a memory import operation, the external handle type of the imported memory must also have been set inVkExternalMemoryImageCreateInfo::handleTypeswhenimagewas created
Valid Usage (Implicit)
subresourcemust be a validVkImageSubresourcestructure- If
memoryis notNULL_HANDLE,memorymust be a validVkDeviceMemoryhandle flagsmust be a valid combination ofVkSparseMemoryBindFlagBitsvalues
See Also
VkExtent3D, VkImageSubresource, VkOffset3D, VkSparseImageMemoryBindInfo
Layout
struct VkSparseImageMemoryBind {
VkImageSubresource subresource();
VkOffset3D offset();
VkExtent3D extent();
VkDeviceMemory memory();
VkDeviceSize memoryOffset();
VkSparseMemoryBindFlags flags();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkSparseImageMemoryBind(ByteBuffer container) Creates aVkSparseImageMemoryBindinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkSparseImageMemoryBindcalloc()Returns a newVkSparseImageMemoryBindinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSparseImageMemoryBindcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSparseImageMemoryBindDeprecated.callocStack(int capacity) Deprecated.callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkSparseImageMemoryBindcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkSparseImageMemoryBindcreate()Returns a newVkSparseImageMemoryBindinstance allocated withBufferUtils.create(int capacity) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withBufferUtils.static VkSparseImageMemoryBindcreate(long address) Returns a newVkSparseImageMemoryBindinstance for the specified memory address.create(long address, int capacity) Create aVkSparseImageMemoryBind.Bufferinstance at the specified memory.static @Nullable VkSparseImageMemoryBindcreateSafe(long address) static @Nullable VkSparseImageMemoryBind.BuffercreateSafe(long address, int capacity) extent()the size in texels of the region within the image subresource to bind.extent(Consumer<VkExtent3D> consumer) extent(VkExtent3D value) Copies the specifiedVkExtent3Dto theextent()field.intflags()are sparse memory binding flags.flags(int value) Sets the specified value to theflags()field.static VkSparseImageMemoryBindmalloc()Returns a newVkSparseImageMemoryBindinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStack.static VkSparseImageMemoryBindmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStack.static VkSparseImageMemoryBindDeprecated.mallocStack(int capacity) Deprecated.mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkSparseImageMemoryBindmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.longmemory()theVkDeviceMemoryobject that the sparse image blocks of the image are bound to.memory(long value) Sets the specified value to thememory()field.longan offset intoVkDeviceMemoryobject.memoryOffset(long value) Sets the specified value to thememoryOffset()field.static VkExtent3Dnextent(long struct) Unsafe version ofextent().static voidnextent(long struct, VkExtent3D value) Unsafe version ofextent.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static longnmemory(long struct) Unsafe version ofmemory().static voidnmemory(long struct, long value) Unsafe version ofmemory.static longnmemoryOffset(long struct) Unsafe version ofmemoryOffset().static voidnmemoryOffset(long struct, long value) Unsafe version ofmemoryOffset.static VkOffset3Dnoffset(long struct) Unsafe version ofoffset().static voidnoffset(long struct, VkOffset3D value) Unsafe version ofoffset.static VkImageSubresourcensubresource(long struct) Unsafe version ofsubresource().static voidnsubresource(long struct, VkImageSubresource value) Unsafe version ofsubresource.offset()are the coordinates of the first texel within the image subresource to bind.offset(Consumer<VkOffset3D> consumer) offset(VkOffset3D value) Copies the specifiedVkOffset3Dto theoffset()field.set(VkImageSubresource subresource, VkOffset3D offset, VkExtent3D extent, long memory, long memoryOffset, int flags) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()the image aspect and region of interest in the image.subresource(Consumer<VkImageSubresource> consumer) Passes thesubresource()field to the specifiedConsumer.subresource(VkImageSubresource value) Copies the specifiedVkImageSubresourceto thesubresource()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SUBRESOURCE
public static final int SUBRESOURCEThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets. -
EXTENT
public static final int EXTENTThe struct member offsets. -
MEMORY
public static final int MEMORYThe struct member offsets. -
MEMORYOFFSET
public static final int MEMORYOFFSETThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets.
-
-
Constructor Details
-
VkSparseImageMemoryBind
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkSparseImageMemoryBind>
-
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 ofoffset + extentequals the corresponding dimensions of the image subresource. -
memory
public long memory()theVkDeviceMemoryobject that the sparse image blocks of the image are bound to. IfmemoryisNULL_HANDLE, the sparse image blocks are unbound. -
memoryOffset
public long memoryOffset() -
flags
public int flags()are sparse memory binding flags. -
subresource
Copies the specifiedVkImageSubresourceto thesubresource()field. -
subresource
Passes thesubresource()field to the specifiedConsumer. -
offset
Copies the specifiedVkOffset3Dto theoffset()field. -
offset
-
extent
Copies the specifiedVkExtent3Dto theextent()field. -
extent
-
memory
Sets the specified value to thememory()field. -
memoryOffset
Sets the specified value to thememoryOffset()field. -
flags
Sets the specified value to theflags()field. -
set
public VkSparseImageMemoryBind set(VkImageSubresource subresource, VkOffset3D offset, VkExtent3D extent, long memory, long memoryOffset, int flags) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkSparseImageMemoryBindinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkSparseImageMemoryBindinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkSparseImageMemoryBindinstance allocated withBufferUtils. -
create
Returns a newVkSparseImageMemoryBindinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkSparseImageMemoryBind.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkSparseImageMemoryBind.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkSparseImageMemoryBind.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkSparseImageMemoryBind.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkSparseImageMemoryBindinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkSparseImageMemoryBind.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkSparseImageMemoryBind.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSparseImageMemoryBind.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsubresource
Unsafe version ofsubresource(). -
noffset
Unsafe version ofoffset(). -
nextent
Unsafe version ofextent(). -
nmemory
public static long nmemory(long struct) Unsafe version ofmemory(). -
nmemoryOffset
public static long nmemoryOffset(long struct) Unsafe version ofmemoryOffset(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nsubresource
Unsafe version ofsubresource. -
noffset
Unsafe version ofoffset. -
nextent
Unsafe version ofextent. -
nmemory
public static void nmemory(long struct, long value) Unsafe version ofmemory. -
nmemoryOffset
public static void nmemoryOffset(long struct, long value) Unsafe version ofmemoryOffset. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags.
-