From 269282fd3647f1b201d2aae4c82b0c0af16c6420 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 7 Sep 2023 10:20:26 -0400 Subject: Add -repro-fallback-directory (#3188) Co-authored-by: Yong He --- docs/command-line-slangc-reference.md | 125 +++++++++++++++++++++++----------- 1 file changed, 85 insertions(+), 40 deletions(-) (limited to 'docs/command-line-slangc-reference.md') diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md index 05b27043f..e5590fadb 100644 --- a/docs/command-line-slangc-reference.md +++ b/docs/command-line-slangc-reference.md @@ -16,6 +16,7 @@ slangc -help-style markdown -h * [Target](#Target) * [Downstream](#Downstream) * [Debugging](#Debugging) +* [Repro](#Repro) * [Experimental](#Experimental) * [Internal](#Internal) * [Deprecated](#Deprecated) @@ -379,11 +380,36 @@ Places the $Globals cbuffer at descriptor set <descriptor-set> and binding Negates (additively inverts) SV_Position.y before writing to stage output. + +## -fvk-use-entrypoint-name +Uses the entrypoint name from the source instead of 'main' in the spirv output. + + + +## -fvk-use-gl-layout +Use std430 layout instead of D3D buffer layout for raw buffer load/stores. + + ## -enable-effect-annotations Enables support for legacy effect annotation syntax. + +## -emit-spirv-via-glsl +Generate SPIR-V output by compiling generated GLSL with glslang (default) + + + +## -emit-spirv-directly +Generate SPIR-V output direclty rather than by compiling generated GLSL with glslang + + + +## -spirv-core-grammar +A path to a specific spirv.core.grammar.json to use when generating SPIR-V output + + # Downstream @@ -391,7 +417,7 @@ Enables support for legacy effect annotation syntax. Downstream compiler options -## -none-path, -fxc-path, -dxc-path, -glslang-path, -visualstudio-path, -clang-path, -gcc-path, -genericcpp-path, -nvrtc-path, -llvm-path +## -none-path, -fxc-path, -dxc-path, -glslang-path, -spirv-dis-path, -visualstudio-path, -clang-path, -gcc-path, -genericcpp-path, -nvrtc-path, -llvm-path **-<[compiler](#compiler)>-path <path>** @@ -460,23 +486,57 @@ Dump the IR for debugging. Dump the IDs with [-dump-ir](#dump-ir) (debug builds only) - -## -dump-repro -Dump a `.slang-repro` file that can be used to reproduce a compilation on another machine. + +## -E, -output-preprocessor +Output the preprocessing result and exit. + + + +## -no-codegen +Skip the code generation step, just check the code and generate layout. + + + +## -output-includes +Print the hierarchy of the processed source files. + + + +## -serial-ir +Serialize the IR between front-end and back-end. + + + +## -skip-codegen +Skip the code generation phase. + + + +## -validate-ir +Validate the IR between the phases. + + + +## -verbose-paths +When displaying diagnostic output aim to display more detailed path information. In practice this is typically the complete 'canonical' path to the source file used. + + + +## -verify-debug-serial-ir +Verify IR in the front-end. + +# Repro + +Slang repro system related ## -dump-repro-on-error Dump `.slang-repro` file on any compilation error. - -## -E, -output-preprocessor -Output the preprocessing result and exit. - - ## -extract-repro @@ -501,16 +561,6 @@ Use repro along specified path Load repro - -## -no-codegen -Skip the code generation step, just check the code and generate layout. - - - -## -output-includes -Print the hierarchy of the processed source files. - - ## -repro-file-system @@ -519,29 +569,27 @@ Print the hierarchy of the processed source files. Use a repro as a file system - -## -serial-ir -Serialize the IR between front-end and back-end. + +## -dump-repro +Dump a `.slang-repro` file that can be used to reproduce a compilation on another machine. - -## -skip-codegen -Skip the code generation phase. - -## -validate-ir -Validate the IR between the phases. + +## -repro-fallback-directory +**-repro-fallback-directory <path>** - -## -verbose-paths -When displaying diagnostic output aim to display more detailed path information. In practice this is typically the complete 'canonical' path to the source file used. +Specify a directory to use if a file isn't found in a repro. Should be specified *before* any repro usage such as `load-repro`. +There are two *special* <path>s: - -## -verify-debug-serial-ir -Verify IR in the front-end. + + +* 'none:' indicates no fallback, so if the file isn't found in the repro compliation will fail + +* 'default:' is the default (which is the OS file system) @@ -550,11 +598,6 @@ Verify IR in the front-end. Experimental options (use at your own risk) - -## -emit-spirv-via-glsl -Generate SPIR-V output by generating and compiling GLSL using glslang - - ## -file-system @@ -667,6 +710,7 @@ Downstream Compilers (aka Pass through) * `fxc` : FXC HLSL compiler * `dxc` : DXC HLSL compiler * `glslang` : GLSLANG GLSL compiler +* `spirv-dis` : spirv-tools SPIRV disassembler * `visualstudio`, `vs` : Visual Studio C/C++ compiler * `clang` : Clang C/C++ compiler * `gcc` : GCC C/C++ compiler @@ -847,12 +891,13 @@ A capability describes an optional feature that a target may or may not support. * `spirv_1_{ 0`, `1`, `2`, `3`, `4`, `5 }` : minimum supported SPIR - V version * `invalid` +* `textual_source` * `hlsl` * `glsl` * `c` * `cpp` * `cuda` -* `spirv` +* `spirv` * `GL_NV_ray_tracing` : enables the GL_NV_ray_tracing extension * `GL_EXT_ray_tracing` : enables the GL_EXT_ray_tracing extension * `GL_NV_fragment_shader_barycentric` : enables the GL_NV_fragment_shader_barycentric extension -- cgit v1.2.3