From 03a5bb4bc0391e2de3c2dfb9ff3213bc0ccd9664 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 9 Aug 2023 10:54:41 -0700 Subject: Various fixes in GLSL emit. (#3074) * Fix name mangling of modified types. * Add `InterlockedAdd(__ref uint, int)` overload. * Fix. * Fix type error in ImageStore legalization. --------- Co-authored-by: Yong He --- source/slang/slang-mangle.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/slang/slang-mangle.cpp') diff --git a/source/slang/slang-mangle.cpp b/source/slang/slang-mangle.cpp index b27a45484..6a3a17caa 100644 --- a/source/slang/slang-mangle.cpp +++ b/source/slang/slang-mangle.cpp @@ -251,6 +251,15 @@ namespace Slang for(Index i = 0; i < n; ++i) emitType(context, tupleType->getMember(i)); } + else if (auto modifiedType = dynamicCast(type)) + { + emitRaw(context, "Tm"); + emitType(context, modifiedType->getBase()); + auto n = modifiedType->getModifierCount(); + emit(context, n); + for (Index i = 0; i < n; ++i) + emitVal(context, modifiedType->getModifier(i)); + } else { SLANG_UNEXPECTED("unimplemented case in type mangling"); @@ -336,6 +345,10 @@ namespace Slang emitVal(context, typecastIntVal->getType()); emitVal(context, typecastIntVal->getBase()); } + else if (auto modifier = as(val)) + { + emitNameImpl(context, UnownedStringSlice(modifier->getClassInfo().m_name)); + } else { SLANG_UNEXPECTED("unimplemented case in val mangling"); -- cgit v1.2.3