From 7c0ebeee95cb72f086a261ed6c55f33571bb62db Mon Sep 17 00:00:00 2001 From: Kai-Hwa Yao Date: Mon, 10 Jul 2017 13:50:16 -0700 Subject: Refactored compile output to work with raw data instead of Strings --- slang.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 87419bf45..56d962490 100644 --- a/slang.h +++ b/slang.h @@ -314,7 +314,7 @@ extern "C" spGetTranslationUnitCount( SlangCompileRequest* request); - /** Get the output code associated with a specific translation unit + /** Get the output code associated with a specific translation unit. The lifetime of the output pointer is the same as `request`. */ @@ -322,7 +322,16 @@ extern "C" SlangCompileRequest* request, int translationUnitIndex); - /** Get the output code associated with a specific entry point. + /** Get the output bytecode associated with a specific translation unit. + + The lifetime of the output pointer is the same as `request`. + */ + SLANG_API void const* spGetTranslationUnitCode( + SlangCompileRequest* request, + int translationUnitIndex, + size_t* outSize); + + /** Get the output source code associated with a specific entry point. The lifetime of the output pointer is the same as `request`. */ @@ -330,6 +339,15 @@ extern "C" SlangCompileRequest* request, int entryPointIndex); + /** Get the output bytecode associated with a specific entry point. + + The lifetime of the output pointer is the same as `request`. + */ + SLANG_API void const* spGetEntryPointCode( + SlangCompileRequest* request, + int entryPointIndex, + size_t* outSize); + /* Note(tfoley): working on new reflection interface... */ -- cgit v1.2.3