summaryrefslogtreecommitdiffstats
path: root/source/slang/reflection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/reflection.cpp')
-rw-r--r--source/slang/reflection.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp
index 20cd188de..f8d12b9e9 100644
--- a/source/slang/reflection.cpp
+++ b/source/slang/reflection.cpp
@@ -658,6 +658,23 @@ SLANG_API SlangParameterCategory spReflectionTypeLayout_GetCategoryByIndex(Slang
return typeLayout->resourceInfos[index].kind;
}
+SLANG_API SlangMatrixLayoutMode spReflectionTypeLayout_GetMatrixLayoutMode(SlangReflectionTypeLayout* inTypeLayout)
+{
+ auto typeLayout = convert(inTypeLayout);
+ if(!typeLayout) return SLANG_MATRIX_LAYOUT_MODE_UNKNOWN;
+
+ if( auto matrixLayout = dynamic_cast<MatrixTypeLayout*>(typeLayout) )
+ {
+ return matrixLayout->mode;
+ }
+ else
+ {
+ return SLANG_MATRIX_LAYOUT_MODE_UNKNOWN;
+ }
+
+}
+
+
// Variable Reflection
SLANG_API char const* spReflectionVariable_GetName(SlangReflectionVariable* inVar)