summaryrefslogtreecommitdiffstats
path: root/docs/user-guide/08-compiling.md
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-03-01 13:39:25 -0800
committerGitHub <noreply@github.com>2024-03-01 13:39:25 -0800
commitff48854b1133935ecc2d32fc3bc35631d0a68e17 (patch)
tree45ea98428a5bfba761a7e1a9b4204d8e969e5317 /docs/user-guide/08-compiling.md
parentcc9ada16b3dbbbd85f03faec74afc7bae4b8014c (diff)
Add documentation for debugging. (#3656)
* Add documentation for debugging. * typo
Diffstat (limited to 'docs/user-guide/08-compiling.md')
-rw-r--r--docs/user-guide/08-compiling.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/user-guide/08-compiling.md b/docs/user-guide/08-compiling.md
index 358246b5a..136b67858 100644
--- a/docs/user-guide/08-compiling.md
+++ b/docs/user-guide/08-compiling.md
@@ -676,3 +676,9 @@ meanings of their `CompilerOptionValue` encodings.
| VulkanBindShiftAll | Specifies the `-fvk-bind-shift` option for all spaces. `intValue0`: kind, `intValue1`: shift. |
| GenerateWholeProgram | When set will emit target code for the entire program instead of for a specific entrypoint. `intValue0` specifies a bool value for the setting. |
| UseUpToDateBinaryModule | When set will only load precompiled modules if it is up-to-date with its source. `intValue0` specifies a bool value for the setting. |
+
+## Debugging
+
+Slang's SPIRV backend supports generating debug information using the [NonSemantic Shader DebugInfo Instructions](https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc).
+To enable debugging information when targing SPIRV, specify the `-emit-spirv-directly` and the `-g2` argument when using `slangc` tool, or set `EmitSpirvDirectly` to `1` and `DebugInformation` to `SLANG_DEBUG_INFO_LEVEL_STANDARD` when using the API.
+Debugging support has been tested with RenderDoc. \ No newline at end of file