diff options
| author | Yong He <yonghe@outlook.com> | 2022-06-29 13:38:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-29 13:38:50 -0700 |
| commit | abc100f81d4b22229105f9ed569a7efafc653a3a (patch) | |
| tree | 06c98c1941ab05d9989c9b7566571ec64ab11c39 /source/slang/slang-emit-cpp.cpp | |
| parent | b7638b8fffe78ade657f361cadc08dffc8c10acf (diff) | |
Native call marshalling for ComPtr parameters and return values. (#2305)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 31f09e400..b52407412 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -522,6 +522,14 @@ SlangResult CPPSourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, S out << "*"; return SLANG_OK; } + case kIROp_NativePtrType: + case kIROp_PtrType: + { + auto elementType = (IRType*)type->getOperand(0); + SLANG_RETURN_ON_FAIL(calcTypeName(elementType, target, out)); + out << "*"; + return SLANG_OK; + } case kIROp_RTTIType: { out << "TypeInfo"; |
