Class VkDeviceMemoryReportCallbackDataEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDeviceMemoryReportCallbackDataEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDeviceMemoryReportCallbackDataEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters returned to the callback.Description
memoryObjectIdis used to avoid double-counting on the same memory object.If an internally-allocated device memory object or a
VkDeviceMemorycannot be exported,memoryObjectIdmust be unique in theVkDevice.If an internally-allocated device memory object or a
VkDeviceMemorysupports being exported,memoryObjectIdmust be unique system wide.If an internal device memory object or a
VkDeviceMemoryis backed by an imported external memory object,memoryObjectIdmust be unique system wide.Note
This structure should only be considered valid during the lifetime of the triggered callback.
For
DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXTandDEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXTevents,objectHandleusually will not yet exist when the application or tool receives the callback.objectHandlewill only exist when the create or allocate call that triggered the event returns, and if the allocation or import ends up failingobjectHandlewill not ever exist.Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXTpNextmust beNULL
Layout
struct VkDeviceMemoryReportCallbackDataEXT { VkStructureTypesType(); void *pNext(); VkDeviceMemoryReportFlagsEXTflags(); VkDeviceMemoryReportEventTypeEXTtype(); uint64_tmemoryObjectId(); VkDeviceSizesize(); VkObjectTypeobjectType(); uint64_tobjectHandle(); uint32_theapIndex(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkDeviceMemoryReportCallbackDataEXT.BufferAn array ofVkDeviceMemoryReportCallbackDataEXTstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFLAGS
HEAPINDEX
MEMORYOBJECTID
OBJECTHANDLE
OBJECTTYPE
PNEXT
SIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
TYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDeviceMemoryReportCallbackDataEXT(java.nio.ByteBuffer container)Creates aVkDeviceMemoryReportCallbackDataEXTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDeviceMemoryReportCallbackDataEXTcalloc()Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated withmemCalloc.static VkDeviceMemoryReportCallbackDataEXT.Buffercalloc(int capacity)Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated withmemCalloc.static VkDeviceMemoryReportCallbackDataEXT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDeviceMemoryReportCallbackDataEXTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDeviceMemoryReportCallbackDataEXTcreate()Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated withBufferUtils.static VkDeviceMemoryReportCallbackDataEXT.Buffercreate(int capacity)Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated withBufferUtils.static VkDeviceMemoryReportCallbackDataEXTcreate(long address)Returns a newVkDeviceMemoryReportCallbackDataEXTinstance for the specified memory address.static VkDeviceMemoryReportCallbackDataEXT.Buffercreate(long address, int capacity)Create aVkDeviceMemoryReportCallbackDataEXT.Bufferinstance at the specified memory.static VkDeviceMemoryReportCallbackDataEXTcreateSafe(long address)static VkDeviceMemoryReportCallbackDataEXT.BuffercreateSafe(long address, int capacity)intflags()0 and reserved for future use.intheapIndex()describes which memory heap this device memory allocation is made from.static VkDeviceMemoryReportCallbackDataEXTmalloc()Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated withmemAlloc.static VkDeviceMemoryReportCallbackDataEXT.Buffermalloc(int capacity)Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated withmemAlloc.static VkDeviceMemoryReportCallbackDataEXT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkDeviceMemoryReportCallbackDataEXTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated on the specifiedMemoryStack.longmemoryObjectId()the unique id for the underlying memory object as described below.static intnflags(long struct)Unsafe version offlags().static intnheapIndex(long struct)Unsafe version ofheapIndex().static longnmemoryObjectId(long struct)Unsafe version ofmemoryObjectId().static longnobjectHandle(long struct)Unsafe version ofobjectHandle().static intnobjectType(long struct)Unsafe version ofobjectType().static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static longnsize(long struct)Unsafe version ofsize().static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static intntype(long struct)Unsafe version oftype().longobjectHandle()the object this device memory report event is attributed to.intobjectType()aVkObjectTypevalue specifying the type of the object associated with this device memory report event.longpNext()NULLor a pointer to a structure extending this structure.VkDeviceMemoryReportCallbackDataEXTpNext(long value)Sets the specified value to thepNext()field.VkDeviceMemoryReportCallbackDataEXTset(int sType, long pNext)Initializes this struct with the specified values.VkDeviceMemoryReportCallbackDataEXTset(VkDeviceMemoryReportCallbackDataEXT src)Copies the specified struct data to this struct.longsize()the size of the memory object in bytes.intsizeof()intsType()the type of this structure.VkDeviceMemoryReportCallbackDataEXTsType(int value)Sets the specified value to thesType()field.VkDeviceMemoryReportCallbackDataEXTsType$Default()Sets theSTRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXTvalue to thesType()field.inttype()aVkDeviceMemoryReportEventTypeEXTtype specifying the type of event reported in thisVkDeviceMemoryReportCallbackDataEXTstructure.
-
-
-
Constructor Detail
-
VkDeviceMemoryReportCallbackDataEXT
public VkDeviceMemoryReportCallbackDataEXT(java.nio.ByteBuffer container)
Creates aVkDeviceMemoryReportCallbackDataEXTinstance 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()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
0 and reserved for future use.
-
type
public int type()
aVkDeviceMemoryReportEventTypeEXTtype specifying the type of event reported in thisVkDeviceMemoryReportCallbackDataEXTstructure.
-
memoryObjectId
public long memoryObjectId()
the unique id for the underlying memory object as described below.
-
size
public long size()
the size of the memory object in bytes. IftypeisDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT,DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXTorDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT,sizeis a validVkDeviceSizevalue. Otherwise,sizeis undefined.
-
objectType
public int objectType()
aVkObjectTypevalue specifying the type of the object associated with this device memory report event. IftypeisDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT,DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT,DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT,DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXTorDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT,objectTypeis a validVkObjectTypeenum. Otherwise,objectTypeis undefined.
-
objectHandle
public long objectHandle()
the object this device memory report event is attributed to. IftypeisDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT,DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT,DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXTorDEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT,objectHandleis a valid Vulkan handle of the type associated withobjectTypeas defined in theVkObjectTypeand Vulkan Handle Relationship table. Otherwise,objectHandleis undefined.
-
heapIndex
public int heapIndex()
describes which memory heap this device memory allocation is made from. IftypeisDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXTorDEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT,heapIndexcorresponds to one of the valid heaps from theVkPhysicalDeviceMemoryPropertiesstructure. Otherwise,heapIndexis undefined.
-
sType
public VkDeviceMemoryReportCallbackDataEXT sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkDeviceMemoryReportCallbackDataEXT sType$Default()
Sets theSTRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXTvalue to thesType()field.
-
pNext
public VkDeviceMemoryReportCallbackDataEXT pNext(long value)
Sets the specified value to thepNext()field.
-
set
public VkDeviceMemoryReportCallbackDataEXT set(int sType, long pNext)
Initializes this struct with the specified values.
-
set
public VkDeviceMemoryReportCallbackDataEXT set(VkDeviceMemoryReportCallbackDataEXT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkDeviceMemoryReportCallbackDataEXT malloc()
Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDeviceMemoryReportCallbackDataEXT calloc()
Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDeviceMemoryReportCallbackDataEXT create()
Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated withBufferUtils.
-
create
public static VkDeviceMemoryReportCallbackDataEXT create(long address)
Returns a newVkDeviceMemoryReportCallbackDataEXTinstance for the specified memory address.
-
createSafe
@Nullable public static VkDeviceMemoryReportCallbackDataEXT createSafe(long address)
-
malloc
public static VkDeviceMemoryReportCallbackDataEXT.Buffer malloc(int capacity)
Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDeviceMemoryReportCallbackDataEXT.Buffer calloc(int capacity)
Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDeviceMemoryReportCallbackDataEXT.Buffer create(int capacity)
Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDeviceMemoryReportCallbackDataEXT.Buffer create(long address, int capacity)
Create aVkDeviceMemoryReportCallbackDataEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkDeviceMemoryReportCallbackDataEXT.Buffer createSafe(long address, int capacity)
-
malloc
public static VkDeviceMemoryReportCallbackDataEXT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkDeviceMemoryReportCallbackDataEXT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDeviceMemoryReportCallbackDataEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkDeviceMemoryReportCallbackDataEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDeviceMemoryReportCallbackDataEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkDeviceMemoryReportCallbackDataEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDeviceMemoryReportCallbackDataEXT.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().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nmemoryObjectId
public static long nmemoryObjectId(long struct)
Unsafe version ofmemoryObjectId().
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
nobjectType
public static int nobjectType(long struct)
Unsafe version ofobjectType().
-
nobjectHandle
public static long nobjectHandle(long struct)
Unsafe version ofobjectHandle().
-
nheapIndex
public static int nheapIndex(long struct)
Unsafe version ofheapIndex().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
-