diff options
| author | Yong He <yonghe@outlook.com> | 2020-09-01 13:47:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-01 13:47:26 -0700 |
| commit | 5c56479c7b742f94ebf4a97d93826b2a5e4f279d (patch) | |
| tree | fdd348b67d09b7af5603532d4015036bee588062 /slang.h | |
| parent | 69025ad82238a7402b18d9c566fac1574faef684 (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.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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 |
