diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2021-01-26 13:32:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-26 13:32:03 -0800 |
| commit | a90c850735664e2928e4cc961442a126c6859b97 (patch) | |
| tree | 8b5e12113319ae87c57f5e616408eb955fe85a2c /source | |
| parent | 50676c741e10ffe6f710c5de86387eaacd274a9a (diff) | |
Integrate reflection more deeply into gfx layer (#1677)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-api.cpp | 8 | ||||
| -rwxr-xr-x | source/slang/slang-compiler.h | 1 | ||||
| -rw-r--r-- | source/slang/slang.cpp | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/source/slang/slang-api.cpp b/source/slang/slang-api.cpp index 4595bac51..56dc44c04 100644 --- a/source/slang/slang-api.cpp +++ b/source/slang/slang-api.cpp @@ -620,6 +620,14 @@ SLANG_API SlangResult spCompileRequest_getProgram( return request->getProgram(outProgram); } +SLANG_API SlangResult spCompileRequest_getProgramWithEntryPoints( + slang::ICompileRequest* request, + slang::IComponentType** outProgram) +{ + SLANG_ASSERT(request); + return request->getProgramWithEntryPoints(outProgram); +} + SLANG_API SlangResult spCompileRequest_getModule( slang::ICompileRequest* request, SlangInt translationUnitIndex, diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h index 62def6f0f..ac2d72862 100755 --- a/source/slang/slang-compiler.h +++ b/source/slang/slang-compiler.h @@ -1920,6 +1920,7 @@ namespace Slang virtual SLANG_NO_THROW SlangReflection* SLANG_MCALL getReflection() SLANG_OVERRIDE; virtual SLANG_NO_THROW void SLANG_MCALL setCommandLineCompilerMode() SLANG_OVERRIDE; virtual SLANG_NO_THROW SlangResult SLANG_MCALL addTargetCapability(SlangInt targetIndex, SlangCapabilityID capability) SLANG_OVERRIDE; + virtual SLANG_NO_THROW SlangResult SLANG_MCALL getProgramWithEntryPoints(slang::IComponentType** outProgram) SLANG_OVERRIDE; EndToEndCompileRequest( diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index c82d5cf65..b711a5327 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4324,6 +4324,13 @@ SlangResult EndToEndCompileRequest::getProgram(slang::IComponentType** outProgra return SLANG_OK; } +SlangResult EndToEndCompileRequest::getProgramWithEntryPoints(slang::IComponentType** outProgram) +{ + auto program = getSpecializedGlobalAndEntryPointsComponentType(); + *outProgram = Slang::ComPtr<slang::IComponentType>(program).detach(); + return SLANG_OK; +} + SlangResult EndToEndCompileRequest::getModule(SlangInt translationUnitIndex, slang::IModule** outModule) { auto module = getFrontEndReq()->getTranslationUnit(translationUnitIndex)->getModule(); |
