From 7cecc518e753a90d9b638e8dd1140730ab010ca7 Mon Sep 17 00:00:00 2001 From: Darren Wihandi <65404740+fairywreath@users.noreply.github.com> Date: Fri, 27 Dec 2024 02:52:49 -0500 Subject: Add packed 8bit builtin types (#5939) * Add packed bytes builtin type * fix test --- source/slang/slang-ir-util.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/slang/slang-ir-util.cpp') diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index 3d2a539a6..7788a50d5 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -105,6 +105,8 @@ IROp getTypeStyle(IROp op) case kIROp_UInt64Type: case kIROp_IntPtrType: case kIROp_UIntPtrType: + case kIROp_Int8x4PackedType: + case kIROp_UInt8x4PackedType: { // All int like return kIROp_IntType; @@ -140,6 +142,8 @@ IROp getTypeStyle(BaseType op) case BaseType::UInt: case BaseType::UInt64: case BaseType::UIntPtr: + case BaseType::Int8x4Packed: + case BaseType::UInt8x4Packed: return kIROp_IntType; case BaseType::Half: case BaseType::Float: @@ -445,6 +449,12 @@ void getTypeNameHint(StringBuilder& sb, IRInst* type) case kIROp_UIntPtrType: sb << "uintptr"; break; + case kIROp_Int8x4PackedType: + sb << "int8_t4_packed"; + break; + case kIROp_UInt8x4PackedType: + sb << "uint8_t4_packed"; + break; case kIROp_CharType: sb << "char"; break; @@ -1735,6 +1745,10 @@ UnownedStringSlice getBasicTypeNameHint(IRType* basicType) return UnownedStringSlice::fromLiteral("uint64"); case kIROp_UIntPtrType: return UnownedStringSlice::fromLiteral("uintptr"); + case kIROp_Int8x4PackedType: + return UnownedStringSlice::fromLiteral("int8_t4_packed"); + case kIROp_UInt8x4PackedType: + return UnownedStringSlice::fromLiteral("uint8_t4_packed"); case kIROp_FloatType: return UnownedStringSlice::fromLiteral("float"); case kIROp_HalfType: -- cgit v1.2.3