VkDeviceMemoryReportCallbackDataEXT
The definition of VkDeviceMemoryReportCallbackDataEXT
is:
typedef struct VkDeviceMemoryReportCallbackDataEXT {
VkStructureType sType;
void* pNext;
VkDeviceMemoryReportFlagsEXT flags;
VkDeviceMemoryReportEventTypeEXT type;
uint64_t memoryObjectId;
VkDeviceSize size;
VkObjectType objectType;
uint64_t objectHandle;
uint32_t heapIndex;
} VkDeviceMemoryReportCallbackDataEXT;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.flags
is 0 and reserved for future use.type
is a VkDeviceMemoryReportEventTypeEXT type specifying the type of event reported in thisVkDeviceMemoryReportCallbackDataEXT
structure.memoryObjectId
is the unique id for the underlying memory object as described below.size
is the size of the memory object in bytes. Iftype
isVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT
,VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT
orVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT
,size
is a valid VkDeviceSize value. Otherwise,size
is undefined:.objectType
is a VkObjectType value specifying the type of the object associated with this device memory report event. Iftype
isVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT
,VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT
,VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT
,VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT
orVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT
,objectType
is a valid VkObjectType enum. Otherwise,objectType
is undefined:.objectHandle
is the object this device memory report event is attributed to. Iftype
isVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT
,VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT
,VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT
orVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT
,objectHandle
is a valid Vulkan handle of the type associated withobjectType
as defined in theVkObjectType
and Vulkan Handle Relationship table. Otherwise,objectHandle
is undefined:.heapIndex
describes which memory heap this device memory allocation is made from. Iftype
isVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT
orVK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT
,heapIndex
corresponds to one of the valid heaps from the VkPhysicalDeviceMemoryProperties structure. Otherwise,heapIndex
is undefined:.
memoryObjectId
is used to avoid double-counting on the same memory
object.
If an internally-allocated device memory object or a VkDeviceMemorycannot be exported, memoryObjectId
must be unique in the
VkDevice.
If an internally-allocated device memory object or a VkDeviceMemory
supports being exported, memoryObjectId
must be unique system wide.
If an internal device memory object or a VkDeviceMemory is backed by
an imported external memory object, memoryObjectId
must be unique
system wide.
This structure should only be considered valid during the lifetime of the triggered callback.
For VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT
and
VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT
events,
objectHandle
usually will not yet exist when the application or tool
receives the callback.
objectHandle
will only exist when the create or allocate call that
triggered the event returns, and if the allocation or import ends up failing
objectHandle
will not ever exist.
Valid Usage (Implicit)
VUID-VkDeviceMemoryReportCallbackDataEXT-sType-sType
sType
must be VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT
VUID-VkDeviceMemoryReportCallbackDataEXT-pNext-pNext
pNext
must be NULL