Search code examples
debuggingrustgraphicsvulkan

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, i.e. a vk::Device. How can I trigger a validation message involving the object to test that the name matches my expectation?


Solution

  • You need to forcefully do something that the validation layers pickup. E.g. creating a buffer with a wrong alignment or flags.

    Another (better) option is to run your application through RenderDoc. It'll display debug names in the trace, so you can easily see if naming of e.g. the device worked properly. You can find all Vulkan resources in the "Resource Inspector":

    enter image description here