为什么验证层没有说我忘记销毁设备或表面? [英] Why validation layer doesn't say me I forgot to destroy a device or a surface?

查看:17
本文介绍了为什么验证层没有说我忘记销毁设备或表面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我向我的实例添加了 VK_LAYER_LUNARG_standard_validation 验证层.接下来我创建了一个调试回调和其他 vulkan 对象.对于测试用例,我要清除的唯一对象是实例(因为验证层应该报告实例破坏).从所有的对象中,我有层只报告关于 VkDebugReportCallbackEXT:

I added VK_LAYER_LUNARG_standard_validation validation layers to my instance. Next I created a debug callback and other vulkan objects. For the test case the only object I'm clearing is the instance (because validation layers should report on instance destruction). And from all of the objects I have the layer reports only about VkDebugReportCallbackEXT:

验证层:之前未删除调试报告回调销毁实例

validation layer: Debug Report callbacks not removed before DestroyInstance

为什么我没有提到 VkSurfaceKHRVkDevice(它们是肯定创建的).

Why it doesn't say me about VkSurfaceKHR and VkDevice (they are created for sure).

推荐答案

其中一些 已修复,但尚未作为 SDK 发布.

Some of it was fixed in head, but not yet released as SDK.

另外一点是,vkDestroyInstance 相关消息只能通过vkCreateInstancepNext 提供的临时调试报告回调进行报告.原因是必须在 vkDestroyInstance 之前销毁所有子对象,包括您的调试回调,因此它在 vkDestroyInstance 期间不可用.

Other thing is that vkDestroyInstance related messages can only be reported through temporary debug report callback provided through pNext of vkCreateInstance. The reason is all the child objects must be destroyed before vkDestroyInstance, including your debug callback, so it is not usable during vkDestroyInstance.

因此,还将您的 VkDebugReportCallbackCreateInfoEXT 链接到 vkCreateInstancepNext 链.

So, also chain your VkDebugReportCallbackCreateInfoEXT to the pNext chain of vkCreateInstance.

这篇关于为什么验证层没有说我忘记销毁设备或表面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆