diff options
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 9353acd35..681999168 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -524,8 +524,13 @@ void initCommandOptions(CommandOptions& options) nullptr, "Preserve all resource parameters in the output code, even if they are not used by the " "shader."}, + {OptionKind::EmitReflectionJSON, + "-reflection-json", + "reflection-json <path>", + "Emit reflection data in JSON format to a file."}, }; + _addOptions(makeConstArrayView(generalOpts), options); /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Target !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ @@ -2663,6 +2668,14 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv) addOutputPath(outputPath.value.getBuffer()); break; } + case OptionKind::EmitReflectionJSON: + { + CommandLineArg outputPath; + SLANG_RETURN_ON_FAIL(m_reader.expectArg(outputPath)); + + linkage->m_optionSet.set(CompilerOptionName::EmitReflectionJSON, outputPath.value); + break; + } case OptionKind::DepFile: { CommandLineArg dependencyPath; |
