From f521c2002e6b664944c6c39bab767dca1802887a Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Fri, 4 Oct 2024 10:20:57 -0400 Subject: 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. --- source/slang/slang.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang.cpp') 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(this); return Super::getInterface(guid); } @@ -4500,6 +4502,8 @@ ISlangUnknown* ComponentType::getInterface(Guid const& guid) { return static_cast(this); } + if(guid == IModulePrecompileService_Experimental::getTypeGuid()) + return static_cast(this); return nullptr; } -- cgit v1.2.3