Any way to generate vulkan shader debug symbols for shader profiling?

According to the docs, #pragma enable_d3d11_debug_symbols should compile debug symbols for just about any graphics API, but that doesn’t seem to be the case, as both render doc and nsight only ever find debugging symbols when I start a build with d3d11.

I’d love to use the nsight gpu trace tool to profile my shaders with hlsl source available, but unfortunately it only supports d3d12 (NOT d3d11on12) and Vulkan, so there’s a mismatch made in hell.

I’ve found the docs for native shader compiler plugins, but those only work for dx11 as well.

Why are all these tools not updated for modern graphics APIs? …but that’s not my actual question, just me being frustrated.

I’m looking for a way to generate vulkan shader debug symbols anyway, so if anyone knows

  • how to inject flags into unity’s hlslcc
  • how to compile the shaders externally and either replace them in the build or load them into nsight
  • a hidden function inside unity to do this that I overlooked
  • a shader profiler with similar capabilities as nsight gpu trace that supports d3d11

please, let me know. thanks

There’s no way to do any of this.
The only tools available are pragmas.

Did you try switching to DX12 and forcing DXC for the shaders you’d like to profile?

I had no idea DXC was an option, that actually did the trick, THANK YOU. Works fine for d3d12.

Still, are there any plans to add support for vulkan debugging symbols in the (near) future? Would be really neat.


PS: In case anyone else finds this, I’ll spare you the google search

#pragma enable_d3d11_debug_symbols
#pragma use_dxc

Also, there’s this google doc with more infos

If they don’t work already, probably not.
You can try Vulkan with DXC, too.

Sadly it still didn’t work for vulkan :slightly_frowning_face:

I guess that means no support is coming? Would be especially cool since nsight also has a shader debugger that only supports vulkan. But at least I can use dx12 + PIX here as an alternative.

Likely, at least for now.