diff options
Diffstat (limited to 'source/slang/compiler.cpp')
| -rw-r--r-- | source/slang/compiler.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/source/slang/compiler.cpp b/source/slang/compiler.cpp index 66df01db0..9c1823f91 100644 --- a/source/slang/compiler.cpp +++ b/source/slang/compiler.cpp @@ -52,7 +52,7 @@ // Includes to allow us to control console // output when writing assembly dumps. -#include <fcntl.h> +#include <fcntl.h> #ifdef _WIN32 #include <io.h> #else @@ -97,6 +97,28 @@ namespace Slang } } + ComPtr<ISlangBlob> CompileResult::getBlob() + { + if(!blob) + { + switch(format) + { + case ResultFormat::None: + default: + break; + + case ResultFormat::Text: + blob = createStringBlob(outputString); + break; + + case ResultFormat::Binary: + blob = createRawBlob(outputBinary.Buffer(), outputBinary.Count()); + break; + } + } + return blob; + } + // EntryPointRequest TranslationUnitRequest* EntryPointRequest::getTranslationUnit() @@ -149,6 +171,7 @@ namespace Slang } } codeBuilder << "\"\n"; + codeBuilder << sourceFile->content << "\n"; } @@ -886,7 +909,7 @@ String dissassembleDXILUsingDXC( void emitEntryPoints( TargetRequest* /*targetReq*/) { - + } void generateOutputForTarget( |
