diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-11-01 08:30:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 08:30:45 -0700 |
| commit | ec41631032b65973e8f92348e0a86bb9924ef981 (patch) | |
| tree | e047fec206bb9fc3ed6303c6963b9e7207097d3a /source/slang/options.cpp | |
| parent | e2b473060133ae25a0be92fcfe80c5c7e51fa10a (diff) | |
Allow use of dxc compiler for DXIL generation (#241)
- Add shader model 6.0, 6.1, and 6.2 targets
- Add DXIL and DXIL assembly as output formats
- Add header for DXC API to `external/`
- Add `dxc-support.cpp` that wraps usage of the API
- Add `-pass-through dxc` option, equivalent to what we have for `fxc`
Notes:
* This does *not* include any logic to add `dxcompiler.dll` to our build process; that is way out of scope for the build complexity I'm ready to deal with
* For right now, the use of `dxcompiler.dll` is hard-coded, and it must be discoverable in the current executable's search path; options to customize can come later
* The `-pass-through` option is kind of silly because the code doesn't actually pay attention to the value (just whether it is set). If you set it to `fxc` but ask for DXIL, we pass through `dxc` anyway.
Diffstat (limited to 'source/slang/options.cpp')
| -rw-r--r-- | source/slang/options.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/options.cpp b/source/slang/options.cpp index 971d17b51..7eea3fecc 100644 --- a/source/slang/options.cpp +++ b/source/slang/options.cpp @@ -317,6 +317,8 @@ struct OptionsParser CASE(spirv, SPIRV); CASE(spirv-assembly, SPIRV_ASM); + CASE(dxil, DXIL); + CASE(dxil-assembly, DXIL_ASM); CASE(none, TARGET_NONE); #undef CASE @@ -390,6 +392,7 @@ struct OptionsParser String name = tryReadCommandLineArgument(arg, &argCursor, argEnd); SlangPassThrough passThrough = SLANG_PASS_THROUGH_NONE; if (name == "fxc") { passThrough = SLANG_PASS_THROUGH_FXC; } + else if (name == "dxc") { passThrough = SLANG_PASS_THROUGH_DXC; } else if (name == "glslang") { passThrough = SLANG_PASS_THROUGH_GLSLANG; } else { |
