From 3192f34f57abd3245995342a0a5971ebbbbd945c Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 15 Apr 2024 23:28:28 -0700 Subject: [GFX] Fix d3d12 buffer view creation logic for StructuredBuffers. (#3954) --- slang.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'slang.h') 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) -- cgit v1.2.3