summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-cuda.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-09-15 20:37:45 -0700
committerGitHub <noreply@github.com>2022-09-15 20:37:45 -0700
commita5d3bec25d70f23da1e79cd7773981ff34593611 (patch)
tree92c8cb983c57bbee141d4e6f3f91f265e04d6a08 /source/slang/slang-emit-cuda.cpp
parenta6032446c6bf7f64d1e201bf438a4c7605a3dbb4 (diff)
Run simple compute kernel in gfx-smoke test. (#2400)
Diffstat (limited to 'source/slang/slang-emit-cuda.cpp')
-rw-r--r--source/slang/slang-emit-cuda.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/slang/slang-emit-cuda.cpp b/source/slang/slang-emit-cuda.cpp
index 7c712d2c5..cbeddcb13 100644
--- a/source/slang/slang-emit-cuda.cpp
+++ b/source/slang/slang-emit-cuda.cpp
@@ -34,6 +34,8 @@ static bool _isSingleNameBasicType(IROp op)
case kIROp_UInt16Type:
case kIROp_UIntType:
case kIROp_UInt64Type:
+ case kIROp_IntPtrType:
+ case kIROp_UIntPtrType:
{
return false;
}
@@ -53,14 +55,18 @@ UnownedStringSlice CUDASourceEmitter::getBuiltinTypeName(IROp op)
case kIROp_Int16Type: return UnownedStringSlice("short");
case kIROp_IntType: return UnownedStringSlice("int");
case kIROp_Int64Type: return UnownedStringSlice("longlong");
- case kIROp_IntPtrType: return UnownedStringSlice("intptr_t");
case kIROp_UInt8Type: return UnownedStringSlice("uchar");
case kIROp_UInt16Type: return UnownedStringSlice("ushort");
case kIROp_UIntType: return UnownedStringSlice("uint");
case kIROp_UInt64Type: return UnownedStringSlice("ulonglong");
- case kIROp_UIntPtrType: return UnownedStringSlice("uintptr_t");
-
+#if SLANG_PTR_IS_64
+ case kIROp_IntPtrType: return UnownedStringSlice("int64_t");
+ case kIROp_UIntPtrType: return UnownedStringSlice("uint64_t");
+#else
+ case kIROp_IntPtrType: return UnownedStringSlice("int");
+ case kIROp_UIntPtrType: return UnownedStringSlice("uint");
+#endif
case kIROp_HalfType:
{
m_extensionTracker->requireBaseType(BaseType::Half);