

#Screen marker extension code
Object names can be set anywhere in your code after the object has been created. Naming information is set using vkDebugMarkerSetObjectName, which takes in a VkDebugMarkerObjectNameInfoEXT structure that contains the type of object to be named as well as it’s handle.
#Screen marker extension Offline
These names can then be displayed by an offline debugging application to help keeping track of them. This includes images, samplers, all sorts of buffers, pipelines, synchronization objects, pools and much more. The extension allows you to name all the different object types available in Vulkan. Once the extension has been enabled on the device and the function pointers have been retrieved, we can start using the new functionality offered by the extension in our application. PfnCmdDebugMarkerInsert = (PFN_vkCmdDebugMarkerInsertEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT") PfnCmdDebugMarkerEnd = (PFN_vkCmdDebugMarkerEndEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT") PfnCmdDebugMarkerBegin = (PFN_vkCmdDebugMarkerBeginEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT") PfnDebugMarkerSetObjectName = (PFN_vkDebugMarkerSetObjectNameEXT)vkGetDeviceProcAddr(device, "vkDebugMarkerSetObjectNameEXT") PfnDebugMarkerSetObjectTag = (PFN_vkDebugMarkerSetObjectTagEXT)vkGetDeviceProcAddr(device, "vkDebugMarkerSetObjectTagEXT") This is only true of the application is run from the debugger that has enabled it’s layer: The first step is to check if the extension is available on the device we want to use for debugging. Note that the extension is only present if the application is run inside of the debugger. Now that we have the layer of a debugging application registered, we can start using it in our application. This tutorial is based on an example from my Vulkan C++ examples that includes a recent header. So if you wan to use it in your own application grab the latest header or LunarG SDK. VK_EXT_debug_marker has been added with Vulkan header revision 12.
#Screen marker extension windows
If you are on Windows you can check the list of layers registered by external applications (called “implicit layers”) by checking the _HKEY_LOCAL MACHINE\SOFTWARE\Khronos\Vulkan\ImplicitLayers registry key. After that the layer should be registered and you can start using RenderDoc with Vulkan. Click on the warning and confirm the next dialog. If you see this warning, RenderDoc’s capture layer has not yet been registered with the loader. If you’re using RenderDoc open the “Capture executable” tab and check for a warning message: The layer (along with the extension on this layer) should be enabled by the offline debugging application. Prerequisites Enable capture in debugging applicationīefore starting to use the new extension, make sure you have at least one registered Vulkan layer with support for VK_EXT_debug_maker. This short tutorial will show you what new functionality this extension introduces and also includes a practical chapter, along with an open source C++ example, to demonstrate it’s usage in a Vulkan application and the graphics debugger. While that’s already pretty useful for debugging purposes, Vulkan 1.0.12 introduced the new extension “ VK_EXT_debug_marker” which is similar to OpenGL’s GL_KHR_Debug extension and adds the ability to name and tag objects and insert debug regions and markers to be displayed by an offline debugger. RenderDoc is able to capture a frame of your application, including all API calls, objects and the complete pipeline state and displays all of that information within a nice UI. This is where offline graphics debugging applications like RenderDoc come into play. They are crucial for getting applications validated against the specification and ensure portability across different implementations.īut what they can’t catch are logical errors, so even with all validation layers enabled and all errors eliminated you still may not see what you where expecting and need an additional layer of debugging your rendering step-by-step. The Vulkan validation layers included with the LunarG SDK are a must for debugging applications at run-time, and every Vulkan developer should get used to them as soon as possible.
