Baldur Karlsson edited this page Feb 16, 2016 · 1 revision

RenderDoc for Vulkan debugging

Hello! You've probably gotten here from the Vulkan SDK and chances are you're wondering what the heck RenderDoc can do for you.

Briefly summarised RenderDoc is a graphics debugging tool that allows you to capture a single frame of an application, then load that capture up in an analysis tool to inspect the API use and GPU work in great detail. This is for example seeing the pipeline state and bound objects at every draw call, the contents of textures and buffers, visualise the results of mesh rendering (see the input data from the vertex shader and the output), and more.

RenderDoc is a tool released in 2014 which I have created in my spare time. With the release of Vulkan I worked in partnership with LunarG and with assistance from Unity to have support ready at version 1.0 to allow debugging from day 1.

Currently the support has some caveats, but most day-to-day features are fully supported.

How to use

The tool is pretty straightforward to use and I try to keep it intuitive. Once you've downloaded and installed it, or built it from source, you can follow along the existing documentation or tutorials to get started. Vulkan is supported just the same as D3D11 and OpenGL in the tool.

You don't have to make any code changes, you can just launch your application through RenderDoc, and you will see it is activated by the text overlay in the top left. Once you trigger a capture by keypress, it will be automatically saved to disk and appear ready to load in the replay UI.

For Vulkan I make use of the excellent layered debugging system in the API, and so RenderDoc has to be registered as an implicit layer (activated without any need for changing code). If you haven't installed the tool and you've either built it from source or downloaded a loose zip, the capture executable window will prompt you to register the implicit layers in the windows registry. You only need to do this once, unless the executable location changes in which case the prompt will re-appear to let you know that the registry needs to be updated.

NOTE: RenderDoc is not a debugger of API usage - it assumes that your API usage is technically valid/correct, but isn't doing what you want. You should make sure your code doesn't have any errors with the validation layers before using RenderDoc to try and capture it, or you might run into crashes or undefined behaviour (just the same as with the drivers themselves!).

Current support

For more details about the current support of Vulkan in RenderDoc, go to this page, which will be kept up to date as new features and support are added.