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-any-value-marshalling.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang-ir-any-value-marshalling.cpp') diff --git a/source/slang/slang-ir-any-value-marshalling.cpp b/source/slang/slang-ir-any-value-marshalling.cpp index 6dc01d495..673a3d168 100644 --- a/source/slang/slang-ir-any-value-marshalling.cpp +++ b/source/slang/slang-ir-any-value-marshalling.cpp @@ -153,6 +153,8 @@ struct AnyValueMarshallingContext case kIROp_IntPtrType: case kIROp_UIntPtrType: case kIROp_PtrType: + case kIROp_Int8x4PackedType: + case kIROp_UInt8x4PackedType: context->marshalBasicType(builder, dataType, concreteTypedVar); break; case kIROp_VectorType: @@ -309,6 +311,8 @@ struct AnyValueMarshallingContext break; } case kIROp_UIntType: + case kIROp_Int8x4PackedType: + case kIROp_UInt8x4PackedType: #if SLANG_PTR_IS_32 case kIROp_UIntPtrType: #endif @@ -537,6 +541,8 @@ struct AnyValueMarshallingContext break; } case kIROp_UIntType: + case kIROp_Int8x4PackedType: + case kIROp_UInt8x4PackedType: { ensureOffsetAt4ByteBoundary(); if (fieldOffset < static_cast(anyValInfo->fieldKeys.getCount())) @@ -812,6 +818,8 @@ SlangInt _getAnyValueSizeRaw(IRType* type, SlangInt offset) case kIROp_FloatType: case kIROp_UIntType: case kIROp_BoolType: + case kIROp_Int8x4PackedType: + case kIROp_UInt8x4PackedType: return alignUp(offset, 4) + 4; case kIROp_UInt64Type: case kIROp_Int64Type: -- cgit v1.2.3