From 2c66cc7ef03b4d38fc463f2c8609a81232fcb91a Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 17 Apr 2024 21:32:28 -0700 Subject: Add skeleton for metal backend. (#3971) --- source/slang/slang-ir-util.cpp | 7 +++++++ 1 file changed, 7 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 380d1141e..eaf254190 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -16,6 +16,13 @@ bool isPointerOfType(IRInst* type, IROp opCode) return false; } +IRType* getVectorElementType(IRType* type) +{ + if (auto vectorType = as(type)) + return vectorType->getElementType(); + return type; +} + Dictionary buildInterfaceRequirementDict(IRInterfaceType* interfaceType) { Dictionary result; -- cgit v1.2.3