From 5290c580632cfb56847b863a32dc020a21d1c93e Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 10 Jan 2025 10:57:04 -0800 Subject: Initial implementation of SP#015 `DescriptorHandle`. (#6028) * Initial implementation of `ResourcePtr`. * Update docs * Fix build error. * Add more discussion. * Update documentation. * Update TOC. * Fix. * Fix. * Add test case for custom `getResourceFromBindlessHandle`. * Add namehint to generated descriptor heap param. * Fix. * Fix. * format code * Rename to `DescriptorHandle`, and add `T.Handle` alias. * Fix compiler error. * Fix. * Fix build. * Renames. * Fix documentation. * Documentation fix. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- 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 d955b7bd9..dedbb2d48 100644 --- a/source/slang/slang-mangle.cpp +++ b/source/slang/slang-mangle.cpp @@ -416,6 +416,19 @@ void emitQualifiedName(ManglingContext* context, DeclRef declRef, bool inc return; } + if (auto genTypeParamDecl = as(declRef.getDecl())) + { + emit(context, "GP"); + emit(context, genTypeParamDecl->parameterIndex); + return; + } + if (auto genValParamDecl = as(declRef.getDecl())) + { + emit(context, "GP"); + emit(context, genValParamDecl->parameterIndex); + return; + } + auto parentDeclRef = declRef.getParent(); if (as(parentDeclRef)) parentDeclRef = parentDeclRef.getParent(); -- cgit v1.2.3