diff options
| author | cheneym2 <acheney@nvidia.com> | 2024-10-04 10:20:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-04 10:20:57 -0400 |
| commit | f521c2002e6b664944c6c39bab767dca1802887a (patch) | |
| tree | 7fb24ff7940a4cdee91f661e607278b4ba530944 /source/slang/slang.cpp | |
| parent | 25c17b9fcbf7a21e9fa19c4a8f08b0406437be24 (diff) | |
Add interfaces for retrieving separate linkable downstream binaries (#5128)
* Implement separate downstream library interface
Create a new com interface to house the methods for
precompiling slang modules to target code.
Add methods to count dependent modules and scrape
them for downstream target binaries such that the
downstream target binaries are linkabe outside
of slang, e.g. via spirv-link or dxc.
Fixes #5147
* Rename to _Experimental
Clearly identify this as an interface subject to change.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index c9717272b..d0fe28185 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4284,6 +4284,8 @@ ISlangUnknown* Module::getInterface(const Guid& guid) { if(guid == IModule::getTypeGuid()) return asExternal(this); + if (guid == IModulePrecompileService_Experimental::getTypeGuid()) + return static_cast<slang::IModulePrecompileService_Experimental*>(this); return Super::getInterface(guid); } @@ -4500,6 +4502,8 @@ ISlangUnknown* ComponentType::getInterface(Guid const& guid) { return static_cast<slang::IComponentType*>(this); } + if(guid == IModulePrecompileService_Experimental::getTypeGuid()) + return static_cast<slang::IModulePrecompileService_Experimental*>(this); return nullptr; } |
