Search code examples
vulkanrenderdoc

Renderdoc statistics overlay appearing when running executable without renderdoc


When using Renderdoc to debug my Vulkan applications, I have noticed that when I execute the application normally somehow Renderdoc is also running and producing the statistics overlay on the window.

For example when executing ./executable from the command line I get: enter image description here

(The information on the top left corner is the Renderdoc statistics)

Note that this still applies when deleting and re-compiling the executable.

I have tried uninstalling Renderdoc but I get the error that Vulkan fails to load librenderdoc.so, I have even tried reinstalling the Vulkan libraries but have had no luck.

Any help as to how I could execute my program normally without displaying the program statistics would be greatly appreciated.

The terminal output (from the validation layers) display: enter image description here


Solution

  • Renderdoc uses Vulkan's layer mechanism to inject itself into the executable.

    They have a lengthy blog post explaining the gory details, but basically what happens is that at runtime all your Vulkan API calls pass through Renderdoc first, which is what causes the statistics to appear. If you don't want that, you simply need to not include the Renderdoc layer when initializing Vulkan.

    You either requested Vulkan to pull in the Renderdoc layer via the ppEnabledLayerNames field in the VkInstanceCreateInfo sturct passed to vkCreateInstance. In that case, you need to change your code to no longer do that and recompile the executable. Or, you may have Renderdoc loaded as an implicit layer. In that case, the executable does not need to be changed at all (and running the executable on a different machine that does not have Renderdoc installed will just work without showing the overlay). Instead, it is the Vulkan loader that pulls in the Renderdoc layer automatically.

    So in that latter case, you need to change the loader configuration for your system. Since this works differently for every system and you did not mention which OS you are using, I will just leave you with a link to the official documentation that contains detailed info for all major operating systems. Simply remove Renderdoc from the list of implicit layers and the overlay should disappear.