summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp7
1 files changed, 7 insertions, 0 deletions
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<IRVectorType>(type))
+ return vectorType->getElementType();
+ return type;
+}
+
Dictionary<IRInst*, IRInst*> buildInterfaceRequirementDict(IRInterfaceType* interfaceType)
{
Dictionary<IRInst*, IRInst*> result;