简体   繁体   English

rust ash (vulkan),如何测试结构的调试名称?

[英]rust ash (vulkan), how can I test the debug name of a struct?

Say I use the DebugUtils object to set the name of a logical device, ie a vk::Device .假设我使用 DebugUtils object 来设置逻辑设备的名称,即vk::Device How can I trigger a validation message involving the object to test that the name matches my expectation?如何触发涉及 object 的验证消息以测试该名称是否符合我的预期?

You need to forcefully do something that the validation layers pickup.您需要强制执行验证层拾取的操作。 Eg creating a buffer with a wrong alignment or flags.例如,使用错误的 alignment 或标志创建缓冲区。

Another (better) option is to run your application through RenderDoc .另一个(更好的)选择是通过RenderDoc运行您的应用程序。 It'll display debug names in the trace, so you can easily see if naming of eg the device worked properly.它将在跟踪中显示调试名称,因此您可以轻松查看例如设备的命名是否正常工作。 You can find all Vulkan resources in the "Resource Inspector":您可以在“资源检查器”中找到所有 Vulkan 资源:

在此处输入图像描述

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

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