summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-mangle.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-09 10:54:41 -0700
committerGitHub <noreply@github.com>2023-08-09 10:54:41 -0700
commit03a5bb4bc0391e2de3c2dfb9ff3213bc0ccd9664 (patch)
tree8bdc7fbf12777c2efe68e677f6802afdb70ba8fc /source/slang/slang-mangle.cpp
parentc4615fe0ae7e1849b23e9a96d1453794b0b40e90 (diff)
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-mangle.cpp')
-rw-r--r--source/slang/slang-mangle.cpp13
1 files changed, 13 insertions, 0 deletions
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<ModifiedType>(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<ModifierVal>(val))
+ {
+ emitNameImpl(context, UnownedStringSlice(modifier->getClassInfo().m_name));
+ }
else
{
SLANG_UNEXPECTED("unimplemented case in val mangling");