summaryrefslogtreecommitdiff
path: root/source/slang/slang-type-layout.h
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2025-03-01 05:22:58 +0800
committerGitHub <noreply@github.com>2025-02-28 13:22:58 -0800
commit618b4c7657f539e66f032cd40554798bc0d68f6d (patch)
tree1ccd5e0aad255aa8e7dd968627aaf40b42348a56 /source/slang/slang-type-layout.h
parent66984eb856454d0a372e3b30643823af18612067 (diff)
Resolve 'extern' types during type layout generation if possible (#6450)
* Resolve 'extern' types during type layout generation if possible Closes https://github.com/shader-slang/slang/issues/5994 Closes https://github.com/shader-slang/slang/issues/6437 * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-type-layout.h')
-rw-r--r--source/slang/slang-type-layout.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-type-layout.h b/source/slang/slang-type-layout.h
index 7d3dd8369..bcb842013 100644
--- a/source/slang/slang-type-layout.h
+++ b/source/slang/slang-type-layout.h
@@ -1183,6 +1183,13 @@ struct TypeLayoutContext
// Options passed to object layout
ObjectLayoutRulesImpl::Options objectLayoutOptions;
+ // Mangled names to DeclRefType, this is used to match up 'extern' types to
+ // their linked in definitions during layout generation
+ std::optional<Dictionary<String, DeclRefType*>> externTypeMap;
+
+ DeclRefType* lookupExternDeclRefType(DeclRefType* declRefType);
+ void buildExternTypeMap();
+
LayoutRulesImpl* getRules() { return rules; }
LayoutRulesFamilyImpl* getRulesFamily() const { return rules->getLayoutRulesFamily(); }