diff options
| -rw-r--r-- | slang.h | 9 | ||||
| -rw-r--r-- | source/slang/slang-reflection.cpp | 9 |
2 files changed, 18 insertions, 0 deletions
@@ -2191,6 +2191,9 @@ extern "C" /// Count should *NOT* include terminating zero. SLANG_API int spComputeStringHash(const char* chars, size_t count); + SLANG_API SlangReflectionTypeLayout* spReflection_getGlobalParamsTypeLayout( + SlangReflection* reflection); + #ifdef __cplusplus } @@ -2856,6 +2859,12 @@ namespace slang { return spReflection_getHashedString((SlangReflection*)this, index, outCount); } + + TypeLayoutReflection* getGlobalParamsTypeLayout() + { + return (TypeLayoutReflection*) spReflection_getGlobalParamsTypeLayout((SlangReflection*) this); + } + }; typedef ISlangBlob IBlob; diff --git a/source/slang/slang-reflection.cpp b/source/slang/slang-reflection.cpp index 1daec501d..1b0a590cc 100644 --- a/source/slang/slang-reflection.cpp +++ b/source/slang/slang-reflection.cpp @@ -1560,3 +1560,12 @@ SLANG_API int spComputeStringHash(const char* chars, size_t count) { return (int)getStableHashCode32(chars, count); } + +SLANG_API SlangReflectionTypeLayout* spReflection_getGlobalParamsTypeLayout( + SlangReflection* reflection) +{ + auto programLayout = convert(reflection); + if(!programLayout) return nullptr; + + return convert(programLayout->parametersLayout->typeLayout); +} |
