简体   繁体   English

Vulkan:转储当前分配的对象?

[英]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. 每当福尔康一个对象被破坏, VK_LAYER_LUNARG_object_tracker启用层,并安装调试报告,将报告的破坏呼叫,并给予通过回调剩余对象的总数。 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. 编辑 :检查object_tracker层的来源( https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/layers/object_tracker.h ),似乎有一个objTrackGetObjectsOfTypeCount的原型,但它们没有好像他们在任何地方都有实施。 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. Vulkan是以最小的驱动程序开销构建的,因此驱动程序尽可能少地执行,并且没有这样的内置功能。 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 . 要编写验证层,您可能需要查看现有的Vulkan验证层

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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