summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-06-11 12:30:58 -0700
committerGitHub <noreply@github.com>2024-06-11 12:30:58 -0700
commitef20d9309674dc8c25a9798d95138cf739299928 (patch)
treeb47838ef6223fe31a0a0bbd69a25ae7509e5bd5d /source
parent5a289681e511ec419829291c7281cdd3c7918b7f (diff)
Test more texture types in Metal (#4333)
This commit adds testing for Metal texture functions with the following six types that the document says supported: - float - half - int32_t - uint32_t - int16_t - uint16_t Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit-metal.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/slang/slang-emit-metal.cpp b/source/slang/slang-emit-metal.cpp
index 366c51840..794a31e41 100644
--- a/source/slang/slang-emit-metal.cpp
+++ b/source/slang/slang-emit-metal.cpp
@@ -552,13 +552,17 @@ void MetalSourceEmitter::emitSimpleTypeImpl(IRType* type)
case kIROp_UInt64Type:
case kIROp_FloatType:
case kIROp_DoubleType:
- case kIROp_Int16Type:
- case kIROp_UInt16Type:
case kIROp_HalfType:
{
m_writer->emit(getDefaultBuiltinTypeName(type->getOp()));
return;
}
+ case kIROp_Int16Type:
+ m_writer->emit("short");
+ return;
+ case kIROp_UInt16Type:
+ m_writer->emit("ushort");
+ return;
case kIROp_IntPtrType:
m_writer->emit("int64_t");
return;