Package org.lwjgl.vulkan
Class VkMappedMemoryRange
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkMappedMemoryRange
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkMappedMemoryRange extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a mapped memory range.Valid Usage
memorymust be currently host mapped- If
sizeis not equal toWHOLE_SIZE,offsetandsizemust specify a range contained within the currently mapped range ofmemory - If
sizeis equal toWHOLE_SIZE,offsetmust be within the currently mapped range ofmemory - If
sizeis equal toWHOLE_SIZE, the end of the current mapping ofmemorymust be a multiple ofVkPhysicalDeviceLimits::nonCoherentAtomSizebytes from the beginning of the memory object. offsetmust be a multiple ofVkPhysicalDeviceLimits::nonCoherentAtomSize- If
sizeis not equal toWHOLE_SIZE,sizemust either be a multiple ofVkPhysicalDeviceLimits::nonCoherentAtomSize, oroffsetplussizemust equal the size ofmemory.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_MAPPED_MEMORY_RANGEpNextmust beNULLmemorymust be a validVkDeviceMemoryhandle
See Also
FlushMappedMemoryRanges,InvalidateMappedMemoryRangesMember documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.memory– the memory object to which this range belongs.offset– the zero-based byte offset from the beginning of the memory object.size– either the size of range, orWHOLE_SIZEto affect the range fromoffsetto the end of the current mapping of the allocation.
Layout
struct VkMappedMemoryRange { VkStructureType sType; void const * pNext; VkDeviceMemory memory; VkDeviceSize offset; VkDeviceSize size; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkMappedMemoryRange.BufferAn array ofVkMappedMemoryRangestructs.
-
Constructor Summary
Constructors Constructor Description VkMappedMemoryRange(java.nio.ByteBuffer container)Creates aVkMappedMemoryRangeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkMappedMemoryRangecalloc()Returns a newVkMappedMemoryRangeinstance allocated withmemCalloc.static VkMappedMemoryRange.Buffercalloc(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemCalloc.static VkMappedMemoryRangecallocStack()Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMappedMemoryRange.BuffercallocStack(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMappedMemoryRange.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMappedMemoryRangecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMappedMemoryRangecreate()Returns a newVkMappedMemoryRangeinstance allocated withBufferUtils.static VkMappedMemoryRange.Buffercreate(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated withBufferUtils.static VkMappedMemoryRangecreate(long address)Returns a newVkMappedMemoryRangeinstance for the specified memory address.static VkMappedMemoryRange.Buffercreate(long address, int capacity)Create aVkMappedMemoryRange.Bufferinstance at the specified memory.static VkMappedMemoryRangecreateSafe(long address)static VkMappedMemoryRange.BuffercreateSafe(long address, int capacity)static VkMappedMemoryRangemalloc()Returns a newVkMappedMemoryRangeinstance allocated withmemAlloc.static VkMappedMemoryRange.Buffermalloc(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemAlloc.static VkMappedMemoryRangemallocStack()Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStack.static VkMappedMemoryRange.BuffermallocStack(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStack.static VkMappedMemoryRange.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStack.static VkMappedMemoryRangemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStack.longmemory()Returns the value of thememoryfield.VkMappedMemoryRangememory(long value)Sets the specified value to thememoryfield.static longnmemory(long struct)Unsafe version ofmemory().static voidnmemory(long struct, long value)Unsafe version ofmemory.static longnoffset(long struct)Unsafe version ofoffset().static voidnoffset(long struct, long value)Unsafe version ofoffset.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static longnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, long value)Unsafe version ofsize.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longoffset()Returns the value of theoffsetfield.VkMappedMemoryRangeoffset(long value)Sets the specified value to theoffsetfield.longpNext()Returns the value of thepNextfield.VkMappedMemoryRangepNext(long value)Sets the specified value to thepNextfield.VkMappedMemoryRangeset(int sType, long pNext, long memory, long offset, long size)Initializes this struct with the specified values.VkMappedMemoryRangeset(VkMappedMemoryRange src)Copies the specified struct data to this struct.longsize()Returns the value of thesizefield.VkMappedMemoryRangesize(long value)Sets the specified value to thesizefield.intsizeof()intsType()Returns the value of thesTypefield.VkMappedMemoryRangesType(int value)Sets the specified value to thesTypefield.
-
-
-
Constructor Detail
-
VkMappedMemoryRange
public VkMappedMemoryRange(java.nio.ByteBuffer container)
Creates aVkMappedMemoryRangeinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
memory
public long memory()
Returns the value of thememoryfield.
-
offset
public long offset()
Returns the value of theoffsetfield.
-
size
public long size()
Returns the value of thesizefield.
-
sType
public VkMappedMemoryRange sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkMappedMemoryRange pNext(long value)
Sets the specified value to thepNextfield.
-
memory
public VkMappedMemoryRange memory(long value)
Sets the specified value to thememoryfield.
-
offset
public VkMappedMemoryRange offset(long value)
Sets the specified value to theoffsetfield.
-
size
public VkMappedMemoryRange size(long value)
Sets the specified value to thesizefield.
-
set
public VkMappedMemoryRange set(int sType, long pNext, long memory, long offset, long size)
Initializes this struct with the specified values.
-
set
public VkMappedMemoryRange set(VkMappedMemoryRange src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkMappedMemoryRange malloc()
Returns a newVkMappedMemoryRangeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkMappedMemoryRange calloc()
Returns a newVkMappedMemoryRangeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkMappedMemoryRange create()
Returns a newVkMappedMemoryRangeinstance allocated withBufferUtils.
-
create
public static VkMappedMemoryRange create(long address)
Returns a newVkMappedMemoryRangeinstance for the specified memory address.
-
createSafe
@Nullable public static VkMappedMemoryRange createSafe(long address)
-
malloc
public static VkMappedMemoryRange.Buffer malloc(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkMappedMemoryRange.Buffer calloc(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkMappedMemoryRange.Buffer create(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkMappedMemoryRange.Buffer create(long address, int capacity)
Create aVkMappedMemoryRange.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkMappedMemoryRange.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkMappedMemoryRange mallocStack()
Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkMappedMemoryRange callocStack()
Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkMappedMemoryRange mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkMappedMemoryRange callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkMappedMemoryRange.Buffer mallocStack(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkMappedMemoryRange.Buffer callocStack(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkMappedMemoryRange.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkMappedMemoryRange.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nmemory
public static long nmemory(long struct)
Unsafe version ofmemory().
-
noffset
public static long noffset(long struct)
Unsafe version ofoffset().
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nmemory
public static void nmemory(long struct, long value)Unsafe version ofmemory.
-
noffset
public static void noffset(long struct, long value)Unsafe version ofoffset.
-
nsize
public static void nsize(long struct, long value)Unsafe version ofsize.
-
-