summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-09-01 13:47:26 -0700
committerGitHub <noreply@github.com>2020-09-01 13:47:26 -0700
commit5c56479c7b742f94ebf4a97d93826b2a5e4f279d (patch)
treefdd348b67d09b7af5603532d4015036bee588062 /slang.h
parent69025ad82238a7402b18d9c566fac1574faef684 (diff)
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.
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h15
1 files changed, 14 insertions, 1 deletions
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<SlangFuncPtr>(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