Closed Firestar99 closed 2 months ago
Only the first method you mentioned is supported and intended to work. None of the others are documented and there is nothing anywhere to suggest these should work. Trying to hack RenderDoc to work in unsupported ways may misbehave or crash. Generally I do not recommend ever having vkconfig open at the same time as RenderDoc as it has caused a number of problems in the past.
If you want to capture your program from RenderDoc you should launch it from the UI. Never specify the layer manually or try to enable internal undocumented functionality.
If the only official way to launch an App with RenderDoc is via it's UI, there does not seem to be a way an application can programmatically attach RenderDoc, is there?
You can save a capture settings file for your application with 'auto start' enabled and launch the UI program with that settings file, which will then run your program.
Otherwise you can use the python replay API, which has access to do capturing, replaying and analysis all programmatically which is how the automated tests run.
Description
Creating a vulkan instance with
VK_LAYER_RENDERDOC_Capture
specified as a layer causes it to error withERROR_INITIALIZATION_FAILED
, with no further detail provided.However, every other way to start an application with renderdoc functions correctly:
VK_LAYER_RENDERDOC_Capture
force enabledLD_PRELOAD=librenderdoc.so
as env varENABLE_VULKAN_RENDERDOC_CAPTURE=1
as env varIf the vulkan application specifies the renderdoc layer, it will always error, regardless if any of the other methods listed above would have enabled renderdoc anyways.
This only started happening since I updated my Renderdoc to 1.32 today, previously I ran a 1.30 beta build with commit 3eccdc736ebe4a7a943127bbea279ce2d7b39732.
Steps to reproduce
Based on SaschaWillems' Vulkan Examples
base/vulkanexamplebase.cpp
l.131 change the stringVK_LAYER_KHRONOS_validation
toVK_LAYER_RENDERDOC_Capture
examples/triangle
VulkanExample
constructor (l.116 in the triangle example) addsettings.validation = true;
Could not create Vulkan instance : ERROR_INITIALIZATION_FAILED