summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-reflection-api.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp
index 6d59761a4..2a3667295 100644
--- a/source/slang/slang-reflection-api.cpp
+++ b/source/slang/slang-reflection-api.cpp
@@ -1587,8 +1587,13 @@ namespace Slang
//
return;
}
- else if(resourceKindCount == 1)
+ else
{
+ // `resourceKindCount` should be 1 in most cases.
+ // However if this field is a buffer of existential type,
+ // the resourceInfo array will contain additional ExistentialTypeParam
+ // and ExistentialObjectParam entries. These entries doesn't affect the
+ // logic here, so we only need to care about the first entry.
auto& resInfo = typeLayout->resourceInfos[0];
LayoutResourceKind kind = resInfo.kind;
@@ -1673,15 +1678,6 @@ namespace Slang
m_extendedInfo->m_bindingRanges.add(bindingRange);
}
- else
- {
- // This type appears to be one that consumes multiple
- // resource kinds, but was not handled by any of
- // the special-case logic above. In such a case we
- // are in trouble.
- //
- return;
- }
}
}
};