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
VkImage
object.Valid Usage
subresource
must be a validVkImageSubresource
structure- If
memory
is notNULL_HANDLE
,memory
must be a validVkDeviceMemory
handle flags
must be a valid combination ofVkSparseMemoryBindFlagBits
values- If the sparse aliased residency feature is not enabled, and if any other resources are bound to ranges of
memory
, the range ofmemory
being bound must not overlap with those bound ranges memory
andmemoryOffset
must match the memory requirements of the calling command'simage
subresource
must be a valid image subresource forimage
offset.x
must be a multiple of the sparse image block width (VkSparseImageFormatProperties
::imageGranularity
.width) of the imageextent.width
must either be a multiple of the sparse image block width of the image, or elseextent.width
+offset.x
must equal the width of the image subresourceoffset.y
must be a multiple of the sparse image block height (VkSparseImageFormatProperties
::imageGranularity
.height) of the imageextent.height
must either be a multiple of the sparse image block height of the image, or elseextent.height
+offset.y
must equal the height of the image subresourceoffset.z
must be a multiple of the sparse image block depth (VkSparseImageFormatProperties
::imageGranularity
.depth) of the imageextent.depth
must either be a multiple of the sparse image block depth of the image, or elseextent.depth
+offset.z
must equal the depth of the image subresource
Member documentation
subresource
– theaspectMask
and 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 + extent
equals the corresponding dimensions of the image subresource.memory
– theVkDeviceMemory
object that the sparse image blocks of the image are bound to. If memory isNULL_HANDLE
, the sparse image blocks are unbound.memoryOffset
– an offset intoVkDeviceMemory
object. Ifmemory
isNULL_HANDLE
, this value is ignored.flags
– sparse memory binding flags. One or more of:SPARSE_MEMORY_BIND_METADATA_BIT
Layout
struct VkSparseImageMemoryBind {
VkImageSubresource
subresource;VkOffset3D
offset;VkExtent3D
extent; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkSparseMemoryBindFlags flags; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkSparseImageMemoryBind.Buffer
An array ofVkSparseImageMemoryBind
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 VkSparseImageMemoryBind(java.nio.ByteBuffer container)
Creates aVkSparseImageMemoryBind
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 VkSparseImageMemoryBind
calloc()
Returns a newVkSparseImageMemoryBind
instance allocated withmemCalloc
.static VkSparseImageMemoryBind.Buffer
calloc(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated withmemCalloc
.static VkSparseImageMemoryBind
callocStack()
Returns a newVkSparseImageMemoryBind
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSparseImageMemoryBind.Buffer
callocStack(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSparseImageMemoryBind.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSparseImageMemoryBind
callocStack(MemoryStack stack)
Returns a newVkSparseImageMemoryBind
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSparseImageMemoryBind
create()
Returns a newVkSparseImageMemoryBind
instance allocated withBufferUtils
.static VkSparseImageMemoryBind.Buffer
create(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated withBufferUtils
.static VkSparseImageMemoryBind
create(long address)
Returns a newVkSparseImageMemoryBind
instance for the specified memory address ornull
if the address isNULL
.static VkSparseImageMemoryBind.Buffer
create(long address, int capacity)
Create aVkSparseImageMemoryBind.Buffer
instance at the specified memory.VkExtent3D
extent()
Returns aVkExtent3D
view of theextent
field.VkSparseImageMemoryBind
extent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theextent
field.int
flags()
Returns the value of theflags
field.VkSparseImageMemoryBind
flags(int value)
Sets the specified value to theflags
field.static VkSparseImageMemoryBind
malloc()
Returns a newVkSparseImageMemoryBind
instance allocated withmemAlloc
.static VkSparseImageMemoryBind.Buffer
malloc(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated withmemAlloc
.static VkSparseImageMemoryBind
mallocStack()
Returns a newVkSparseImageMemoryBind
instance allocated on the thread-localMemoryStack
.static VkSparseImageMemoryBind.Buffer
mallocStack(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
.static VkSparseImageMemoryBind.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated on the specifiedMemoryStack
.static VkSparseImageMemoryBind
mallocStack(MemoryStack stack)
Returns a newVkSparseImageMemoryBind
instance allocated on the specifiedMemoryStack
.long
memory()
Returns the value of thememory
field.VkSparseImageMemoryBind
memory(long value)
Sets the specified value to thememory
field.long
memoryOffset()
Returns the value of thememoryOffset
field.VkSparseImageMemoryBind
memoryOffset(long value)
Sets the specified value to thememoryOffset
field.VkSparseImageMemoryBind
nset(long struct)
Unsafe version ofset
.VkOffset3D
offset()
Returns aVkOffset3D
view of theoffset
field.VkSparseImageMemoryBind
offset(VkOffset3D value)
Copies the specifiedVkOffset3D
to theoffset
field.VkSparseImageMemoryBind
set(VkImageSubresource subresource, VkOffset3D offset, VkExtent3D extent, long memory, long memoryOffset, int flags)
Initializes this struct with the specified values.VkSparseImageMemoryBind
set(VkSparseImageMemoryBind src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.VkImageSubresource
subresource()
Returns aVkImageSubresource
view of thesubresource
field.VkSparseImageMemoryBind
subresource(VkImageSubresource value)
Copies the specifiedVkImageSubresource
to thesubresource
field.-
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 aVkSparseImageMemoryBind
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)
.
-
subresource
public VkImageSubresource subresource()
Returns aVkImageSubresource
view of thesubresource
field.
-
offset
public VkOffset3D offset()
Returns aVkOffset3D
view of theoffset
field.
-
extent
public VkExtent3D extent()
Returns aVkExtent3D
view of theextent
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.
-
subresource
public VkSparseImageMemoryBind subresource(VkImageSubresource value)
Copies the specifiedVkImageSubresource
to thesubresource
field.
-
offset
public VkSparseImageMemoryBind offset(VkOffset3D value)
Copies the specifiedVkOffset3D
to theoffset
field.
-
extent
public VkSparseImageMemoryBind extent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theextent
field.
-
memory
public VkSparseImageMemoryBind memory(long value)
Sets the specified value to thememory
field.
-
memoryOffset
public VkSparseImageMemoryBind memoryOffset(long value)
Sets the specified value to thememoryOffset
field.
-
flags
public VkSparseImageMemoryBind flags(int value)
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.
-
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 newVkSparseImageMemoryBind
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSparseImageMemoryBind calloc()
Returns a newVkSparseImageMemoryBind
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSparseImageMemoryBind create()
Returns a newVkSparseImageMemoryBind
instance allocated withBufferUtils
.
-
create
public static VkSparseImageMemoryBind create(long address)
Returns a newVkSparseImageMemoryBind
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkSparseImageMemoryBind.Buffer malloc(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSparseImageMemoryBind.Buffer calloc(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSparseImageMemoryBind.Buffer create(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSparseImageMemoryBind.Buffer create(long address, int capacity)
Create aVkSparseImageMemoryBind.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkSparseImageMemoryBind mallocStack()
Returns a newVkSparseImageMemoryBind
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSparseImageMemoryBind callocStack()
Returns a newVkSparseImageMemoryBind
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSparseImageMemoryBind mallocStack(MemoryStack stack)
Returns a newVkSparseImageMemoryBind
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSparseImageMemoryBind callocStack(MemoryStack stack)
Returns a newVkSparseImageMemoryBind
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSparseImageMemoryBind.Buffer callocStack(int capacity)
Returns a newVkSparseImageMemoryBind.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkSparseImageMemoryBind.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSparseImageMemoryBind.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-