简体   繁体   中英

Vulkan: dump currently allocated objects?

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM