diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2025-07-01 23:36:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 23:36:02 +0800 |
| commit | c94ca1692e101df87215232e87fa7edadc1a7b05 (patch) | |
| tree | d84c5b27af4d88cd5bdd71358bc2434e8f47a1ce /include/slang-deprecated.h | |
| parent | d50c3f34a2eda5bf5e278c78d32cc9923fd83b82 (diff) | |
Allow Link time constant array length sizing, warn on unsupported functionality (#7067)
* Add link time array layout test
* Add link time constant array size compilation test
* Link time constant array size test
* Allow getting link time array size
Closes https://github.com/shader-slang/slang/issues/6753
* format
* Switch to SIMPLE test and check output
* Implement without binary api changes
* diagnose on link time constant sized array
* fix test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'include/slang-deprecated.h')
| -rw-r--r-- | include/slang-deprecated.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/slang-deprecated.h b/include/slang-deprecated.h index 2ae91c6d8..f210e8c48 100644 --- a/include/slang-deprecated.h +++ b/include/slang-deprecated.h @@ -478,9 +478,19 @@ extern "C" If the size of a type cannot be statically computed, perhaps because it depends on a generic parameter that has not been bound to a specific value, this function returns zero. + + Use spReflectionType_GetSpecializedElementCount if the size is dependent on + a link time constant */ SLANG_API size_t spReflectionType_GetElementCount(SlangReflectionType* type); + /** The same as spReflectionType_GetElementCount except it takes into account specialization + * information from the given reflection info + */ + SLANG_API size_t spReflectionType_GetSpecializedElementCount( + SlangReflectionType* type, + SlangReflection* reflection); + SLANG_API SlangReflectionType* spReflectionType_GetElementType(SlangReflectionType* type); SLANG_API unsigned int spReflectionType_GetRowCount(SlangReflectionType* type); |
