From 387f2be1e48a805ef0da34510a5ae0ebc0ba9c3e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 15 Jan 2025 20:43:01 -0800 Subject: Inline global constants that contains opaque handles for legalization. (#6098) * Inline global constants that contains opaque handles for legalization. * Add diagnostics on opaque type global variables. * Fix. * Fix test. --- source/slang/slang-check-conformance.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-check-conformance.cpp') diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp index 499b409ea..71b87f447 100644 --- a/source/slang/slang-check-conformance.cpp +++ b/source/slang/slang-check-conformance.cpp @@ -347,9 +347,16 @@ TypeTag SemanticsVisitor::getTypeTags(Type* type) if (auto parameterGroupType = as(type)) { auto elementTags = getTypeTags(parameterGroupType->getElementType()); - elementTags = (TypeTag)((int)elementTags & ~(int)TypeTag::Unsized); + elementTags = (TypeTag)(((int)elementTags & ~(int)TypeTag::Unsized) | (int)TypeTag::Opaque); return elementTags; } + else if ( + as(type) || as(type) || + as(type) || as(type) || + as(type)) + { + return TypeTag::Opaque; + } else if (auto declRefType = as(type)) { if (auto aggTypeDecl = as(declRefType->getDeclRef())) -- cgit v1.2.3