diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2024-12-27 02:52:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-26 23:52:49 -0800 |
| commit | 7cecc518e753a90d9b638e8dd1140730ab010ca7 (patch) | |
| tree | 2d8769853421ffda8671e7d10b79e53f2e9c25f9 /source/slang/slang-ir-util.cpp | |
| parent | 2ad1f8138771cef32b710f8c47d4c7beb3f4eab5 (diff) | |
Add packed 8bit builtin types (#5939)
* Add packed bytes builtin type
* fix test
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
| -rw-r--r-- | source/slang/slang-ir-util.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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: |
