Skip to main content

Module shader_debug

Module shader_debug 

Source
Expand description

Canonical locations of the shader debug dumps.

Two components write these files — the transpiler dumps the wrapped GLSL it feeds to naga, and the custom-shader renderer dumps the WGSL naga produces — and several more report the paths to the user through shader diagnostics and the AI inspector. They used to disagree: the renderer hardcoded /tmp on Unix while the transpiler used the system temp directory, so on macOS the reported wrapped-GLSL path pointed somewhere the file had never been written. Everything now resolves through this module.

Constants§

WRAPPED_GLSL_FILE_NAME
File name of the wrapped-GLSL dump written by the transpiler in debug builds.

Functions§

debug_dump_dir
Directory the shader debug dumps are written to.
transpiled_wgsl_path
Path of the transpiled-WGSL dump for shader_name.
wrapped_glsl_path
Path of the wrapped-GLSL dump the transpiler writes in debug builds.