From ef20d9309674dc8c25a9798d95138cf739299928 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:30:58 -0700 Subject: 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 --- source/slang/slang-emit-metal.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source') 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; -- cgit v1.2.3