summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index f81a63275..8a8017ef3 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -80,6 +80,32 @@
namespace Slang
{
+
+ // !!!!!!!!!!!!!!!!!!!!!! free functions for DiagnosicSink !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ void printDiagnosticArg(StringBuilder& sb, CodeGenTarget val)
+ {
+ switch (val)
+ {
+ default:
+ sb << "<unknown>";
+ break;
+
+ #define CASE(TAG, STR) case CodeGenTarget::TAG: sb << STR; break
+ CASE(GLSL, "glsl");
+ CASE(HLSL, "hlsl");
+ CASE(SPIRV, "spirv");
+ CASE(SPIRVAssembly, "spriv-assembly");
+ CASE(DXBytecode, "dxbc");
+ CASE(DXBytecodeAssembly, "dxbc-assembly");
+ CASE(DXIL, "dxil");
+ CASE(DXILAssembly, "dxil-assembly");
+ #undef CASE
+ }
+ }
+
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CompileResult !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
SlangResult CompileResult::getSharedLibrary(ComPtr<ISlangSharedLibrary>& outSharedLibrary)
{
if (downstreamResult)