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-emit-c-like.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-emit-c-like.cpp') diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index b70069d42..3175f1b07 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -274,6 +274,11 @@ void CLikeSourceEmitter::emitSimpleType(IRType* type) case kIROp_UIntPtrType: return UnownedStringSlice("uintptr_t"); + case kIROp_Int8x4PackedType: + return UnownedStringSlice("int8_t4_packed"); + case kIROp_UInt8x4PackedType: + return UnownedStringSlice("uint8_t4_packed"); + case kIROp_HalfType: return UnownedStringSlice("half"); @@ -1272,6 +1277,8 @@ void CLikeSourceEmitter::emitSimpleValueImpl(IRInst* inst) return; } case BaseType::UInt: + case BaseType::Int8x4Packed: + case BaseType::UInt8x4Packed: { m_writer->emit(UInt(uint32_t(litInst->value.intVal))); m_writer->emit("U"); @@ -3896,6 +3903,8 @@ void CLikeSourceEmitter::emitVecNOrScalar( m_writer->emit("ushort"); break; case kIROp_UIntType: + case kIROp_Int8x4PackedType: + case kIROp_UInt8x4PackedType: m_writer->emit("uint"); break; case kIROp_UInt64Type: -- cgit v1.2.3