From 5c56479c7b742f94ebf4a97d93826b2a5e4f279d Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 1 Sep 2020 13:47:26 -0700 Subject: Support dynamic existential shader parameters in render-test (#1525) * Support dynamic existential shader parameters in render-test * Fix linux build error. * Fixes. * Fix code review issues. * Fix gcc error. * More fixes. * More fixes. --- slang.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 1b79f97ab..13df1121e 100644 --- a/slang.h +++ b/slang.h @@ -890,7 +890,15 @@ extern "C" @param name The name of the function @return The function pointer related to the name or nullptr if not found */ - virtual SLANG_NO_THROW SlangFuncPtr SLANG_MCALL findFuncByName(char const* name) = 0; + inline SlangFuncPtr SLANG_MCALL findFuncByName(char const* name) + { + return reinterpret_cast(findSymbolAddressByName(name)); + } + /** Get a symbol by name. If the library is unloaded will only return nullptr. + @param name The name of the symbol + @return The pointer related to the name or nullptr if not found + */ + virtual SLANG_NO_THROW void* SLANG_MCALL findSymbolAddressByName(char const* name) = 0; }; #define SLANG_UUID_ISlangSharedLibrary { 0x9c9d5bc5, 0xeb61, 0x496f,{ 0x80, 0xd7, 0xd1, 0x47, 0xc4, 0xa2, 0x37, 0x30 } }; @@ -3374,6 +3382,11 @@ SLANG_API SlangResult spCompileRequest_getModule( SlangInt translationUnitIndex, slang::IModule** outModule); +/** Get the `ISession` handle behind the `SlangCompileRequest`. +*/ +SLANG_API SlangResult spCompileRequest_getSession( + SlangCompileRequest* request, + slang::ISession** outSession); #endif /* DEPRECATED DEFINITIONS -- cgit v1.2.3