RenderDoc Capture with Vulkan RHI Fails Due to Validation Layer Conflict in UE 5.6.1

Hey there,

we are using Unreal Engine 5.6.1 with the Vulkan RHI and need to capture frames using RenderDoc to investigate a Memory Issue. The RenderDoc plugin is enabled, but when we enable Auto Attach on Startup, the editor fails to launch with the error:

“Failed to load Vulkan driver …”

Our guess is that Unreal initializes its own Vulkan layers, and RenderDoc tries to inject its layers at the same time causing the conflict. Without the Auto Attach in Startup the application launches just fine.

We also tried to Launch a debug devolopment build directly with RenderDoc, but at Launch we get the same error, the log file contains that entry:

VK_LAYER_PATH=/usr/share/vulkan/explicit_layer.d:../../../Engine/Binaries/ThirdParty/Vulkan/Linux

We also tried this on Windows building the project with Vulkan instead of DX12 but have the same issue.

All the necessary files for Vulkan and the nVIDIA driver are installed and in the right locations.

We also tried to disable the validation layer in the DefaultEngine.ine file as well as over the command line, this allowed the launch but then the API is None and RenderDoc cannot capture frames.

Is there an way to make Unreal and RenderDoc work together with Vulkan without disabling validation layers completely?

Can Unreal provide a mechanism to allow RenderDoc injection without breaking Vulkan initialization?

Steps to Reproduce

  1. Generate a project using the VulkanRHI
  2. Open RenderDoc
  3. Launch the project /Attach to running project

At ‘Launch’ the project will not start “Failed to load Vulkan Driver …”

Attach: unable to capture any frames

Hi there,

This is happening because the RenderDoc interception layer is modifying various feature support reporting before returning it to the application. This is likely due to renderdoc not yet implementing support for certain features that Unreal currently lists as required for the SM6 shader model. Fortunately you skip these restrictive feature check fairly easily by either passing `-SkipVulkanProfileCheck` as a command line argument when you launch your project or game, or by settings r.Vulkan.UseProfileCheck=0 in your DefaultEngine.ini under the [/Script/Engine.RendererSettings] section.

For reference, the features that Unreal is checking for, and that RenderDoc is explicitly reporting as unsupported, are as follows:

- VkPhysicalDeviceMeshShaderFeaturesEXT::multiviewMeshShader is always reported as VK_FALSE by the RenderDoc layer.

Note: This is probably only really required when using an XR headset (and probably only mobile ones at that, since that is the only case I’m aware of that actually uses the multiview extensions in Unreal).

- The R64_UINT format does not report the STORAGE_IMAGE_BIT | STORAGE_IMAGE_ATOMIC_BIT optimal tiling property flags when format properties are queried through the RenderDoc layer.

Note: This is likely because the RenderDoc layer is disabling all optimal tiling property flags in the case that the original property flags not report support for SAMPLED_IMAGE_BIT, which the R64_UINT does not support (at least on my hardware).

I will make a bug report for this tomorrow to see if this can get solved on the Engine side, since it doesn’t seem like either of these features are strictly necessary for the Engine to operate normally.

Regards,

Lance Chaney

I’ve reported this as a bug to epic. Once it has been triaged, it should become publicly visible here.

Regards,

Lance Chaney