summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-04-15 23:28:28 -0700
committerGitHub <noreply@github.com>2024-04-15 23:28:28 -0700
commit3192f34f57abd3245995342a0a5971ebbbbd945c (patch)
treedc139be9fe9f4995bac96513571cc9e0526ce547 /slang.h
parent030d7f45726187b5b23a3cfb9743166aa60fae30 (diff)
[GFX] Fix d3d12 buffer view creation logic for StructuredBuffers. (#3954)
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/slang.h b/slang.h
index 4ed37d88c..77e9d3bd9 100644
--- a/slang.h
+++ b/slang.h
@@ -2390,6 +2390,7 @@ extern "C"
SLANG_API size_t spReflectionTypeLayout_GetStride(SlangReflectionTypeLayout* type, SlangParameterCategory category);
SLANG_API int32_t spReflectionTypeLayout_getAlignment(SlangReflectionTypeLayout* type, SlangParameterCategory category);
+ SLANG_API uint32_t spReflectionTypeLayout_GetFieldCount(SlangReflectionTypeLayout* type);
SLANG_API SlangReflectionVariableLayout* spReflectionTypeLayout_GetFieldByIndex(SlangReflectionTypeLayout* type, unsigned index);
SLANG_API SlangInt spReflectionTypeLayout_findFieldIndexByName(SlangReflectionTypeLayout* typeLayout, const char* nameBegin, const char* nameEnd);
@@ -2884,7 +2885,7 @@ namespace slang
unsigned int getFieldCount()
{
- return getType()->getFieldCount();
+ return spReflectionTypeLayout_GetFieldCount((SlangReflectionTypeLayout*)this);
}
VariableLayoutReflection* getFieldByIndex(unsigned int index)