From ec41631032b65973e8f92348e0a86bb9924ef981 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 1 Nov 2017 08:30:45 -0700 Subject: 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. --- slang.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 11b34053c..5c84ce6f3 100644 --- a/slang.h +++ b/slang.h @@ -89,6 +89,8 @@ extern "C" SLANG_SPIRV_ASM, SLANG_DXBC, SLANG_DXBC_ASM, + SLANG_DXIL, + SLANG_DXIL_ASM, }; /* A "container format" describes the way that the outputs @@ -1079,6 +1081,7 @@ namespace slang #include "source/core/text-io.cpp" #include "source/slang/bytecode.cpp" #include "source/slang/diagnostics.cpp" +#include "source/slang/dxc-support.cpp" #include "source/slang/emit.cpp" #include "source/slang/ir.cpp" #include "source/slang/lexer.cpp" -- cgit v1.2.3