Reputation: 10039
Whenever an object in Vulkan is destroyed, and the VK_LAYER_LUNARG_object_tracker
layer is enabled, and a debug report is installed, it will report the destroy call and give the total number of objects remaining via the callback. Eg:
INFO: [OBJTRACK]: OBJ_STAT Destroy VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT obj 0xcf43130 (217 total objs remain & 1 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT objs).
Is there some way to get information about the objects that are still allocated?
Edit:
Inspecting the source of the object_tracker layer (https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/layers/object_tracker.h), it seems that there is a prototype for objTrackGetObjectsOfTypeCount
, but they don't seem like they have implementations anywhere. Is this function somehow accessible?
Upvotes: 4
Views: 524
Reputation: 4853
Vulkan is built with minimal driver overhead, so driver does as little as possible and there is no such built-in functionality. Only way to get info about existing objects is to either keep track of the objects yourself or write a layer to do it for you.
There don't seem to be any existing layers, which such functionality. For writing a validation layer, you might want to take a look at the existing Vulkan validation layers.
Upvotes: 4