I'm writing some Vulkan code and write my shaders in GLSL.

I tried to use Renderdoc to debug my shaders, but I only got disassembly code.

Is it possible to debug shaders at the level of GLSL if I have the source code of the shaders in GLSL format?

enter image description here


1 Answer 1


No, as the main author Baldur Karlsson explicitly states in the tracking GitHub issue:

Currently the debugging is primarily at SPIR-V level, not source language level

Vulkan Shader Debugging tracking issue · Issue #1908 · baldurk/renderdoc

You can use the OpSource SPIR-V instruction to include the source language text in the shader module, at which point the Source Unavailable button becomes a clickable Debug in Source button, but at this point it just doesn't (and isn't supposed to) work; stepping seems to jump all over the place.

Though it might be worth mentioning that including the source language text with OpSource enables you to use RenderDoc's shader editing feature which allows you to directly edit the GLSL code and immediately see the result in the texture viewer. (Use glslang::TIntermediate::addSourceText if you're compiling with glslang.)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .