summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-com-interface.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-20 01:03:06 -0700
committerGitHub <noreply@github.com>2022-08-20 01:03:06 -0700
commitaf70651a4843b16dd24e14b5cedffe399ebeb862 (patch)
treea6aefd5db94a048114b9a8d7ed3f826533105fab /source/slang/slang-ir-com-interface.cpp
parent6412c4913b6a063438bb11863f2c154d3ae42dfe (diff)
Call `gfx` in slang program. (#2370)
Diffstat (limited to 'source/slang/slang-ir-com-interface.cpp')
-rw-r--r--source/slang/slang-ir-com-interface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/slang-ir-com-interface.cpp b/source/slang/slang-ir-com-interface.cpp
index d9d54d9d2..3e52054cd 100644
--- a/source/slang/slang-ir-com-interface.cpp
+++ b/source/slang/slang-ir-com-interface.cpp
@@ -16,6 +16,8 @@ static bool _canReplace(IRUse* use)
case kIROp_WitnessTableType:
case kIROp_RTTIPointerType:
case kIROp_RTTIHandleType:
+ case kIROp_ComPtrType:
+ case kIROp_NativePtrType:
{
// Don't replace
return false;
@@ -25,7 +27,6 @@ static bool _canReplace(IRUse* use)
// Appears replacable.
break;
}
- case kIROp_ComPtrType:
case kIROp_PtrType:
{
// We can have ** and ComPtr<T>*.
@@ -98,7 +99,7 @@ void lowerComInterfaces(IRModule* module, ArtifactStyle artifactStyle, Diagnosti
// so has to be a raw pointer
IRType* result = (artifactStyle == ArtifactStyle::Host) ?
static_cast<IRType*>(builder.getComPtrType(comIntf)) :
- static_cast<IRType*>(builder.getPtrType(comIntf));
+ static_cast<IRType*>(builder.getNativePtrType(comIntf));
// Go through replacing all of the replacable uses
for (auto use : uses)